mars3d-cesium 1.91.0 → 1.92.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 (98) hide show
  1. package/Build/Cesium/Cesium.d.ts +1093 -874
  2. package/Build/Cesium/Cesium.js +8 -8
  3. package/Build/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +115 -114
  4. package/Build/Cesium/ThirdParty/draco_decoder.wasm +0 -0
  5. package/Build/Cesium/Workers/AttributeCompression-7a823eb1.js +1 -0
  6. package/Build/Cesium/Workers/AxisAlignedBoundingBox-67e6ea73.js +1 -0
  7. package/Build/Cesium/Workers/BoundingRectangle-26667f9b.js +1 -0
  8. package/Build/Cesium/Workers/BoxGeometry-9cdc8b92.js +1 -0
  9. package/Build/Cesium/Workers/Color-ef7e91c1.js +1 -0
  10. package/Build/Cesium/Workers/ComponentDatatype-a9820060.js +1 -0
  11. package/Build/Cesium/Workers/CoplanarPolygonGeometryLibrary-042de0d0.js +1 -0
  12. package/Build/Cesium/Workers/CorridorGeometryLibrary-3bc63965.js +1 -0
  13. package/Build/Cesium/Workers/CylinderGeometry-2d940a6c.js +1 -0
  14. package/Build/Cesium/Workers/CylinderGeometryLibrary-fe5ec654.js +1 -0
  15. package/Build/Cesium/Workers/EllipseGeometry-0b2a6f30.js +1 -0
  16. package/Build/Cesium/Workers/EllipseGeometryLibrary-71538ff1.js +1 -0
  17. package/Build/Cesium/Workers/EllipseOutlineGeometry-197fc9b2.js +1 -0
  18. package/Build/Cesium/Workers/EllipsoidGeodesic-7d405754.js +1 -0
  19. package/Build/Cesium/Workers/EllipsoidGeometry-230054c9.js +1 -0
  20. package/Build/Cesium/Workers/EllipsoidOutlineGeometry-b4c7becf.js +1 -0
  21. package/Build/Cesium/Workers/EllipsoidRhumbLine-7b6199fa.js +1 -0
  22. package/Build/Cesium/Workers/EllipsoidTangentPlane-73d81019.js +1 -0
  23. package/Build/Cesium/Workers/EncodedCartesian3-ee8e4156.js +1 -0
  24. package/Build/Cesium/Workers/FrustumGeometry-70a14d9a.js +1 -0
  25. package/Build/Cesium/Workers/GeometryAttribute-ce92871d.js +1 -0
  26. package/Build/Cesium/Workers/GeometryAttributes-1b4134a9.js +1 -0
  27. package/Build/Cesium/Workers/GeometryInstance-86b030a6.js +1 -0
  28. package/Build/Cesium/Workers/GeometryOffsetAttribute-4d39b441.js +1 -0
  29. package/Build/Cesium/Workers/GeometryPipeline-b301e381.js +1 -0
  30. package/Build/Cesium/Workers/IndexDatatype-1cbc8622.js +1 -0
  31. package/Build/Cesium/Workers/IntersectionTests-5ec530d5.js +1 -0
  32. package/Build/Cesium/Workers/Matrix2-1509208a.js +1 -0
  33. package/Build/Cesium/Workers/OrientedBoundingBox-d1d264af.js +1 -0
  34. package/Build/Cesium/Workers/Plane-e3daa19b.js +1 -0
  35. package/Build/Cesium/Workers/PolygonGeometryLibrary-58067699.js +1 -0
  36. package/Build/Cesium/Workers/PolygonPipeline-85da16de.js +1 -0
  37. package/Build/Cesium/Workers/PolylinePipeline-1aca6c21.js +1 -0
  38. package/Build/Cesium/Workers/PolylineVolumeGeometryLibrary-beeaf259.js +1 -0
  39. package/Build/Cesium/Workers/PrimitivePipeline-319f1075.js +1 -0
  40. package/Build/Cesium/Workers/RectangleGeometryLibrary-82f244b8.js +1 -0
  41. package/Build/Cesium/Workers/RuntimeError-ac440aa5.js +1 -0
  42. package/Build/Cesium/Workers/TerrainEncoding-484e2741.js +1 -0
  43. package/Build/Cesium/Workers/Transforms-bd15b2e7.js +39 -0
  44. package/Build/Cesium/Workers/VertexFormat-e68722dd.js +1 -0
  45. package/Build/Cesium/Workers/WallGeometryLibrary-72a383b0.js +1 -0
  46. package/Build/Cesium/Workers/WebMercatorProjection-2d827489.js +1 -0
  47. package/Build/Cesium/Workers/_commonjsHelpers-3aae1032-15991586.js +1 -0
  48. package/Build/Cesium/Workers/arrayRemoveDuplicates-fe254feb.js +1 -0
  49. package/Build/Cesium/Workers/combine-0259f56f.js +1 -0
  50. package/Build/Cesium/Workers/combineGeometry.js +1 -1
  51. package/Build/Cesium/Workers/createBoxGeometry.js +1 -1
  52. package/Build/Cesium/Workers/createBoxOutlineGeometry.js +1 -1
  53. package/Build/Cesium/Workers/createCircleGeometry.js +1 -1
  54. package/Build/Cesium/Workers/createCircleOutlineGeometry.js +1 -1
  55. package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
  56. package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
  57. package/Build/Cesium/Workers/createCorridorGeometry.js +1 -1
  58. package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +1 -1
  59. package/Build/Cesium/Workers/createCylinderGeometry.js +1 -1
  60. package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +1 -1
  61. package/Build/Cesium/Workers/createEllipseGeometry.js +1 -1
  62. package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +1 -1
  63. package/Build/Cesium/Workers/createEllipsoidGeometry.js +1 -1
  64. package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
  65. package/Build/Cesium/Workers/createFrustumGeometry.js +1 -1
  66. package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +1 -1
  67. package/Build/Cesium/Workers/createGeometry.js +1 -1
  68. package/Build/Cesium/Workers/createGroundPolylineGeometry.js +1 -1
  69. package/Build/Cesium/Workers/createPlaneGeometry.js +1 -1
  70. package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +1 -1
  71. package/Build/Cesium/Workers/createPolygonGeometry.js +1 -1
  72. package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +1 -1
  73. package/Build/Cesium/Workers/createPolylineGeometry.js +1 -1
  74. package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +1 -1
  75. package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
  76. package/Build/Cesium/Workers/createRectangleGeometry.js +1 -1
  77. package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +1 -1
  78. package/Build/Cesium/Workers/createSimplePolylineGeometry.js +1 -1
  79. package/Build/Cesium/Workers/createSphereGeometry.js +1 -1
  80. package/Build/Cesium/Workers/createSphereOutlineGeometry.js +1 -1
  81. package/Build/Cesium/Workers/createTaskProcessorWorker.js +1 -1
  82. package/Build/Cesium/Workers/createVectorTileClampedPolylines.js +1 -1
  83. package/Build/Cesium/Workers/createVectorTileGeometries.js +1 -1
  84. package/Build/Cesium/Workers/createVectorTilePoints.js +1 -1
  85. package/Build/Cesium/Workers/createVectorTilePolygons.js +1 -1
  86. package/Build/Cesium/Workers/createVectorTilePolylines.js +1 -1
  87. package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
  88. package/Build/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
  89. package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
  90. package/Build/Cesium/Workers/createWallGeometry.js +1 -1
  91. package/Build/Cesium/Workers/createWallOutlineGeometry.js +1 -1
  92. package/Build/Cesium/Workers/decodeDraco.js +1 -1
  93. package/Build/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +1 -1
  94. package/Build/Cesium/Workers/defaultValue-69ee94f4.js +1 -0
  95. package/Build/Cesium/Workers/transcodeKTX2.js +1 -1
  96. package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
  97. package/LICENSE.md +0 -29
  98. package/package.json +5 -3
@@ -1669,6 +1669,15 @@ export class Cartesian2 {
1669
1669
  * @returns A cartesian with the maximum components.
1670
1670
  */
1671
1671
  static maximumByComponent(first: Cartesian2, second: Cartesian2, result: Cartesian2): Cartesian2;
1672
+ /**
1673
+ * Constrain a value to lie between two values.
1674
+ * @param value - The value to clamp.
1675
+ * @param min - The minimum bound.
1676
+ * @param max - The maximum bound.
1677
+ * @param result - The object into which to store the result.
1678
+ * @returns The clamped value such that min <= result <= max.
1679
+ */
1680
+ static clamp(value: Cartesian2, min: Cartesian2, max: Cartesian2, result: Cartesian2): Cartesian2;
1672
1681
  /**
1673
1682
  * Computes the provided Cartesian's squared magnitude.
1674
1683
  * @param cartesian - The Cartesian instance whose squared magnitude is to be computed.
@@ -2002,6 +2011,15 @@ export class Cartesian3 {
2002
2011
  * @returns A cartesian with the maximum components.
2003
2012
  */
2004
2013
  static maximumByComponent(first: Cartesian3, second: Cartesian3, result: Cartesian3): Cartesian3;
2014
+ /**
2015
+ * Constrain a value to lie between two values.
2016
+ * @param cartesian - The value to clamp.
2017
+ * @param min - The minimum bound.
2018
+ * @param max - The maximum bound.
2019
+ * @param result - The object into which to store the result.
2020
+ * @returns The clamped value such that min <= value <= max.
2021
+ */
2022
+ static clamp(cartesian: Cartesian3, min: Cartesian3, max: Cartesian3, result: Cartesian3): Cartesian3;
2005
2023
  /**
2006
2024
  * Computes the provided Cartesian's squared magnitude.
2007
2025
  * @param cartesian - The Cartesian instance whose squared magnitude is to be computed.
@@ -2419,6 +2437,15 @@ export class Cartesian4 {
2419
2437
  * @returns A cartesian with the maximum components.
2420
2438
  */
2421
2439
  static maximumByComponent(first: Cartesian4, second: Cartesian4, result: Cartesian4): Cartesian4;
2440
+ /**
2441
+ * Constrain a value to lie between two values.
2442
+ * @param value - The value to clamp.
2443
+ * @param min - The minimum bound.
2444
+ * @param max - The maximum bound.
2445
+ * @param result - The object into which to store the result.
2446
+ * @returns The clamped value such that min <= result <= max.
2447
+ */
2448
+ static clamp(value: Cartesian4, min: Cartesian4, max: Cartesian4, result: Cartesian4): Cartesian4;
2422
2449
  /**
2423
2450
  * Computes the provided Cartesian's squared magnitude.
2424
2451
  * @param cartesian - The Cartesian instance whose squared magnitude is to be computed.
@@ -8698,20 +8725,20 @@ export class IonResource extends Resource {
8698
8725
  clone(result?: Resource): Resource;
8699
8726
  /**
8700
8727
  * Asynchronously loads the given image resource. Returns a promise that will resolve to
8701
- an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if <code>preferImageBitmap</code> is true and the browser supports <code>createImageBitmap</code> or otherwise an
8702
- {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
8728
+ * an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if <code>preferImageBitmap</code> is true and the browser supports <code>createImageBitmap</code> or otherwise an
8729
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
8703
8730
  * @example
8704
8731
  * // load a single image asynchronously
8705
- resource.fetchImage().then(function(image) {
8706
- // use the loaded image
8707
- }).otherwise(function(error) {
8708
- // an error occurred
8709
- });
8710
-
8711
- // load several images in parallel
8712
- when.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
8713
- // images is an array containing all the loaded images
8714
- });
8732
+ * resource.fetchImage().then(function(image) {
8733
+ * // use the loaded image
8734
+ * }).catch(function(error) {
8735
+ * // an error occurred
8736
+ * });
8737
+ *
8738
+ * // load several images in parallel
8739
+ * Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
8740
+ * // images is an array containing all the loaded images
8741
+ * });
8715
8742
  * @param [options] - An object with the following properties.
8716
8743
  * @param [options.preferBlob = false] - If true, we will load the image via a blob.
8717
8744
  * @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
@@ -9573,10 +9600,10 @@ export namespace Math {
9573
9600
  function previousPowerOfTwo(n: number): number;
9574
9601
  /**
9575
9602
  * Constraint a value to lie between two values.
9576
- * @param value - The value to constrain.
9603
+ * @param value - The value to clamp.
9577
9604
  * @param min - The minimum value.
9578
9605
  * @param max - The maximum value.
9579
- * @returns The value clamped so that min <= value <= max.
9606
+ * @returns The clamped value such that min <= result <= max.
9580
9607
  */
9581
9608
  function clamp(value: number, min: number, max: number): number;
9582
9609
  /**
@@ -14723,33 +14750,33 @@ export enum RequestType {
14723
14750
  * A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
14724
14751
  * @example
14725
14752
  * function refreshTokenRetryCallback(resource, error) {
14726
- if (error.statusCode === 403) {
14727
- // 403 status code means a new token should be generated
14728
- return getNewAccessToken()
14729
- .then(function(token) {
14730
- resource.queryParameters.access_token = token;
14731
- return true;
14732
- })
14733
- .otherwise(function() {
14734
- return false;
14735
- });
14736
- }
14737
-
14738
- return false;
14739
- }
14740
-
14741
- const resource = new Resource({
14742
- url: 'http://server.com/path/to/resource.json',
14743
- proxy: new DefaultProxy('/proxy/'),
14744
- headers: {
14745
- 'X-My-Header': 'valueOfHeader'
14746
- },
14747
- queryParameters: {
14748
- 'access_token': '123-435-456-000'
14749
- },
14750
- retryCallback: refreshTokenRetryCallback,
14751
- retryAttempts: 1
14752
- });
14753
+ * if (error.statusCode === 403) {
14754
+ * // 403 status code means a new token should be generated
14755
+ * return getNewAccessToken()
14756
+ * .then(function(token) {
14757
+ * resource.queryParameters.access_token = token;
14758
+ * return true;
14759
+ * })
14760
+ * .catch(function() {
14761
+ * return false;
14762
+ * });
14763
+ * }
14764
+ *
14765
+ * return false;
14766
+ * }
14767
+ *
14768
+ * const resource = new Resource({
14769
+ * url: 'http://server.com/path/to/resource.json',
14770
+ * proxy: new DefaultProxy('/proxy/'),
14771
+ * headers: {
14772
+ * 'X-My-Header': 'valueOfHeader'
14773
+ * },
14774
+ * queryParameters: {
14775
+ * 'access_token': '123-435-456-000'
14776
+ * },
14777
+ * retryCallback: refreshTokenRetryCallback,
14778
+ * retryAttempts: 1
14779
+ * });
14753
14780
  * @param options - A url or an object with the following properties
14754
14781
  * @param options.url - The url of the resource.
14755
14782
  * @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
@@ -14829,7 +14856,7 @@ export class Resource {
14829
14856
  hasHeaders: boolean;
14830
14857
  /**
14831
14858
  * Override Object#toString so that implicit string conversion gives the
14832
- complete URL represented by this Resource.
14859
+ * complete URL represented by this Resource.
14833
14860
  * @returns The URL represented by this Resource
14834
14861
  */
14835
14862
  toString(): string;
@@ -14842,20 +14869,20 @@ export class Resource {
14842
14869
  getUrlComponent(query?: boolean, proxy?: boolean): string;
14843
14870
  /**
14844
14871
  * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
14845
- as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
14872
+ * as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
14846
14873
  * @param params - The query parameters
14847
14874
  * @param [useAsDefault = false] - If true the params will be used as the default values, so they will only be set if they are undefined.
14848
14875
  */
14849
14876
  setQueryParameters(params: any, useAsDefault?: boolean): void;
14850
14877
  /**
14851
14878
  * Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
14852
- as opposed to adding them one at a time to the queryParameters property.
14879
+ * as opposed to adding them one at a time to the queryParameters property.
14853
14880
  * @param params - The query parameters
14854
14881
  */
14855
14882
  appendQueryParameters(params: any): void;
14856
14883
  /**
14857
14884
  * Combines the specified object and the existing template values. This allows you to add many values at once,
14858
- as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
14885
+ * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
14859
14886
  * @param template - The template values
14860
14887
  * @param [useAsDefault = false] - If true the values will be used as the default values, so they will only be set if they are undefined.
14861
14888
  */
@@ -14903,16 +14930,16 @@ export class Resource {
14903
14930
  appendForwardSlash(): void;
14904
14931
  /**
14905
14932
  * Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to
14906
- an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
14907
- using XMLHttpRequest, which means that in order to make requests to another origin,
14908
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
14933
+ * an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
14934
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
14935
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
14909
14936
  * @example
14910
14937
  * // load a single URL asynchronously
14911
- resource.fetchArrayBuffer().then(function(arrayBuffer) {
14912
- // use the data
14913
- }).otherwise(function(error) {
14914
- // an error occurred
14915
- });
14938
+ * resource.fetchArrayBuffer().then(function(arrayBuffer) {
14939
+ * // use the data
14940
+ * }).catch(function(error) {
14941
+ * // an error occurred
14942
+ * });
14916
14943
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
14917
14944
  */
14918
14945
  fetchArrayBuffer(): Promise<ArrayBuffer> | undefined;
@@ -14941,16 +14968,16 @@ export class Resource {
14941
14968
  }): Promise<ArrayBuffer> | undefined;
14942
14969
  /**
14943
14970
  * Asynchronously loads the given resource as a blob. Returns a promise that will resolve to
14944
- a Blob once loaded, or reject if the resource failed to load. The data is loaded
14945
- using XMLHttpRequest, which means that in order to make requests to another origin,
14946
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
14971
+ * a Blob once loaded, or reject if the resource failed to load. The data is loaded
14972
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
14973
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
14947
14974
  * @example
14948
14975
  * // load a single URL asynchronously
14949
- resource.fetchBlob().then(function(blob) {
14950
- // use the data
14951
- }).otherwise(function(error) {
14952
- // an error occurred
14953
- });
14976
+ * resource.fetchBlob().then(function(blob) {
14977
+ * // use the data
14978
+ * }).catch(function(error) {
14979
+ * // an error occurred
14980
+ * });
14954
14981
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
14955
14982
  */
14956
14983
  fetchBlob(): Promise<Blob> | undefined;
@@ -14979,20 +15006,20 @@ export class Resource {
14979
15006
  }): Promise<Blob> | undefined;
14980
15007
  /**
14981
15008
  * Asynchronously loads the given image resource. Returns a promise that will resolve to
14982
- an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if <code>preferImageBitmap</code> is true and the browser supports <code>createImageBitmap</code> or otherwise an
14983
- {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
15009
+ * an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if <code>preferImageBitmap</code> is true and the browser supports <code>createImageBitmap</code> or otherwise an
15010
+ * {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
14984
15011
  * @example
14985
15012
  * // load a single image asynchronously
14986
- resource.fetchImage().then(function(image) {
14987
- // use the loaded image
14988
- }).otherwise(function(error) {
14989
- // an error occurred
14990
- });
14991
-
14992
- // load several images in parallel
14993
- when.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
14994
- // images is an array containing all the loaded images
14995
- });
15013
+ * resource.fetchImage().then(function(image) {
15014
+ * // use the loaded image
15015
+ * }).catch(function(error) {
15016
+ * // an error occurred
15017
+ * });
15018
+ *
15019
+ * // load several images in parallel
15020
+ * Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
15021
+ * // images is an array containing all the loaded images
15022
+ * });
14996
15023
  * @param [options] - An object with the following properties.
14997
15024
  * @param [options.preferBlob = false] - If true, we will load the image via a blob.
14998
15025
  * @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
@@ -15039,22 +15066,22 @@ export class Resource {
15039
15066
  }): Promise<ImageBitmap> | Promise<HTMLImageElement> | undefined;
15040
15067
  /**
15041
15068
  * Asynchronously loads the given resource as text. Returns a promise that will resolve to
15042
- a String once loaded, or reject if the resource failed to load. The data is loaded
15043
- using XMLHttpRequest, which means that in order to make requests to another origin,
15044
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15069
+ * a String once loaded, or reject if the resource failed to load. The data is loaded
15070
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15071
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15045
15072
  * @example
15046
15073
  * // load text from a URL, setting a custom header
15047
- const resource = new Resource({
15048
- url: 'http://someUrl.com/someJson.txt',
15049
- headers: {
15050
- 'X-Custom-Header' : 'some value'
15051
- }
15052
- });
15053
- resource.fetchText().then(function(text) {
15054
- // Do something with the text
15055
- }).otherwise(function(error) {
15056
- // an error occurred
15057
- });
15074
+ * const resource = new Resource({
15075
+ * url: 'http://someUrl.com/someJson.txt',
15076
+ * headers: {
15077
+ * 'X-Custom-Header' : 'some value'
15078
+ * }
15079
+ * });
15080
+ * resource.fetchText().then(function(text) {
15081
+ * // Do something with the text
15082
+ * }).catch(function(error) {
15083
+ * // an error occurred
15084
+ * });
15058
15085
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
15059
15086
  */
15060
15087
  fetchText(): Promise<string> | undefined;
@@ -15083,17 +15110,17 @@ export class Resource {
15083
15110
  }): Promise<string> | undefined;
15084
15111
  /**
15085
15112
  * Asynchronously loads the given resource as JSON. Returns a promise that will resolve to
15086
- a JSON object once loaded, or reject if the resource failed to load. The data is loaded
15087
- using XMLHttpRequest, which means that in order to make requests to another origin,
15088
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
15089
- adds 'Accept: application/json,&#42;&#47;&#42;;q=0.01' to the request headers, if not
15090
- already specified.
15113
+ * a JSON object once loaded, or reject if the resource failed to load. The data is loaded
15114
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15115
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
15116
+ * adds 'Accept: application/json,&#42;&#47;&#42;;q=0.01' to the request headers, if not
15117
+ * already specified.
15091
15118
  * @example
15092
15119
  * resource.fetchJson().then(function(jsonData) {
15093
- // Do something with the JSON object
15094
- }).otherwise(function(error) {
15095
- // an error occurred
15096
- });
15120
+ * // Do something with the JSON object
15121
+ * }).catch(function(error) {
15122
+ * // an error occurred
15123
+ * });
15097
15124
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
15098
15125
  */
15099
15126
  fetchJson(): Promise<any> | undefined;
@@ -15122,18 +15149,18 @@ export class Resource {
15122
15149
  }): Promise<any> | undefined;
15123
15150
  /**
15124
15151
  * Asynchronously loads the given resource as XML. Returns a promise that will resolve to
15125
- an XML Document once loaded, or reject if the resource failed to load. The data is loaded
15126
- using XMLHttpRequest, which means that in order to make requests to another origin,
15127
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15152
+ * an XML Document once loaded, or reject if the resource failed to load. The data is loaded
15153
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15154
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15128
15155
  * @example
15129
15156
  * // load XML from a URL, setting a custom header
15130
- Cesium.loadXML('http://someUrl.com/someXML.xml', {
15131
- 'X-Custom-Header' : 'some value'
15132
- }).then(function(document) {
15133
- // Do something with the document
15134
- }).otherwise(function(error) {
15135
- // an error occurred
15136
- });
15157
+ * Cesium.loadXML('http://someUrl.com/someXML.xml', {
15158
+ * 'X-Custom-Header' : 'some value'
15159
+ * }).then(function(document) {
15160
+ * // Do something with the document
15161
+ * }).catch(function(error) {
15162
+ * // an error occurred
15163
+ * });
15137
15164
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
15138
15165
  */
15139
15166
  fetchXML(): Promise<XMLDocument> | undefined;
@@ -15164,11 +15191,11 @@ export class Resource {
15164
15191
  * Requests a resource using JSONP.
15165
15192
  * @example
15166
15193
  * // load a data asynchronously
15167
- resource.fetchJsonp().then(function(data) {
15168
- // use the loaded data
15169
- }).otherwise(function(error) {
15170
- // an error occurred
15171
- });
15194
+ * resource.fetchJsonp().then(function(data) {
15195
+ * // use the loaded data
15196
+ * }).catch(function(error) {
15197
+ * // an error occurred
15198
+ * });
15172
15199
  * @param [callbackParameterName = 'callback'] - The callback parameter name that the server expects.
15173
15200
  * @returns a promise that will resolve to the requested data when loaded. Returns undefined if <code>request.throttle</code> is true and the request does not have high enough priority.
15174
15201
  */
@@ -15200,17 +15227,17 @@ export class Resource {
15200
15227
  }): Promise<any> | undefined;
15201
15228
  /**
15202
15229
  * Asynchronously loads the given resource. Returns a promise that will resolve to
15203
- the result once loaded, or reject if the resource failed to load. The data is loaded
15204
- using XMLHttpRequest, which means that in order to make requests to another origin,
15205
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
15206
- the more specific functions eg. fetchJson, fetchBlob, etc.
15230
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15231
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15232
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
15233
+ * the more specific functions eg. fetchJson, fetchBlob, etc.
15207
15234
  * @example
15208
15235
  * resource.fetch()
15209
- .then(function(body) {
15210
- // use the data
15211
- }).otherwise(function(error) {
15212
- // an error occurred
15213
- });
15236
+ * .then(function(body) {
15237
+ * // use the data
15238
+ * }).catch(function(error) {
15239
+ * // an error occurred
15240
+ * });
15214
15241
  * @param [options] - Object with the following properties:
15215
15242
  * @param [options.responseType] - The type of response. This controls the type of item returned.
15216
15243
  * @param [options.headers] - Additional HTTP headers to send with the request, if any.
@@ -15251,16 +15278,16 @@ export class Resource {
15251
15278
  }): Promise<any> | undefined;
15252
15279
  /**
15253
15280
  * Asynchronously deletes the given resource. Returns a promise that will resolve to
15254
- the result once loaded, or reject if the resource failed to load. The data is loaded
15255
- using XMLHttpRequest, which means that in order to make requests to another origin,
15256
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15281
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15282
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15283
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15257
15284
  * @example
15258
15285
  * resource.delete()
15259
- .then(function(body) {
15260
- // use the data
15261
- }).otherwise(function(error) {
15262
- // an error occurred
15263
- });
15286
+ * .then(function(body) {
15287
+ * // use the data
15288
+ * }).catch(function(error) {
15289
+ * // an error occurred
15290
+ * });
15264
15291
  * @param [options] - Object with the following properties:
15265
15292
  * @param [options.responseType] - The type of response. This controls the type of item returned.
15266
15293
  * @param [options.headers] - Additional HTTP headers to send with the request, if any.
@@ -15303,16 +15330,16 @@ export class Resource {
15303
15330
  }): Promise<any> | undefined;
15304
15331
  /**
15305
15332
  * Asynchronously gets headers the given resource. Returns a promise that will resolve to
15306
- the result once loaded, or reject if the resource failed to load. The data is loaded
15307
- using XMLHttpRequest, which means that in order to make requests to another origin,
15308
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15333
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15334
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15335
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15309
15336
  * @example
15310
15337
  * resource.head()
15311
- .then(function(headers) {
15312
- // use the data
15313
- }).otherwise(function(error) {
15314
- // an error occurred
15315
- });
15338
+ * .then(function(headers) {
15339
+ * // use the data
15340
+ * }).catch(function(error) {
15341
+ * // an error occurred
15342
+ * });
15316
15343
  * @param [options] - Object with the following properties:
15317
15344
  * @param [options.responseType] - The type of response. This controls the type of item returned.
15318
15345
  * @param [options.headers] - Additional HTTP headers to send with the request, if any.
@@ -15353,16 +15380,16 @@ export class Resource {
15353
15380
  }): Promise<any> | undefined;
15354
15381
  /**
15355
15382
  * Asynchronously gets options the given resource. Returns a promise that will resolve to
15356
- the result once loaded, or reject if the resource failed to load. The data is loaded
15357
- using XMLHttpRequest, which means that in order to make requests to another origin,
15358
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15383
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15384
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15385
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15359
15386
  * @example
15360
15387
  * resource.options()
15361
- .then(function(headers) {
15362
- // use the data
15363
- }).otherwise(function(error) {
15364
- // an error occurred
15365
- });
15388
+ * .then(function(headers) {
15389
+ * // use the data
15390
+ * }).catch(function(error) {
15391
+ * // an error occurred
15392
+ * });
15366
15393
  * @param [options] - Object with the following properties:
15367
15394
  * @param [options.responseType] - The type of response. This controls the type of item returned.
15368
15395
  * @param [options.headers] - Additional HTTP headers to send with the request, if any.
@@ -15403,16 +15430,16 @@ export class Resource {
15403
15430
  }): Promise<any> | undefined;
15404
15431
  /**
15405
15432
  * Asynchronously posts data to the given resource. Returns a promise that will resolve to
15406
- the result once loaded, or reject if the resource failed to load. The data is loaded
15407
- using XMLHttpRequest, which means that in order to make requests to another origin,
15408
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15433
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15434
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15435
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15409
15436
  * @example
15410
15437
  * resource.post(data)
15411
- .then(function(result) {
15412
- // use the result
15413
- }).otherwise(function(error) {
15414
- // an error occurred
15415
- });
15438
+ * .then(function(result) {
15439
+ * // use the result
15440
+ * }).catch(function(error) {
15441
+ * // an error occurred
15442
+ * });
15416
15443
  * @param data - Data that is posted with the resource.
15417
15444
  * @param [options] - Object with the following properties:
15418
15445
  * @param [options.data] - Data that is posted with the resource.
@@ -15458,16 +15485,16 @@ export class Resource {
15458
15485
  }): Promise<any> | undefined;
15459
15486
  /**
15460
15487
  * Asynchronously puts data to the given resource. Returns a promise that will resolve to
15461
- the result once loaded, or reject if the resource failed to load. The data is loaded
15462
- using XMLHttpRequest, which means that in order to make requests to another origin,
15463
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15488
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15489
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15490
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15464
15491
  * @example
15465
15492
  * resource.put(data)
15466
- .then(function(result) {
15467
- // use the result
15468
- }).otherwise(function(error) {
15469
- // an error occurred
15470
- });
15493
+ * .then(function(result) {
15494
+ * // use the result
15495
+ * }).catch(function(error) {
15496
+ * // an error occurred
15497
+ * });
15471
15498
  * @param data - Data that is posted with the resource.
15472
15499
  * @param [options] - Object with the following properties:
15473
15500
  * @param [options.responseType] - The type of response. This controls the type of item returned.
@@ -15511,16 +15538,16 @@ export class Resource {
15511
15538
  }): Promise<any> | undefined;
15512
15539
  /**
15513
15540
  * Asynchronously patches data to the given resource. Returns a promise that will resolve to
15514
- the result once loaded, or reject if the resource failed to load. The data is loaded
15515
- using XMLHttpRequest, which means that in order to make requests to another origin,
15516
- the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15541
+ * the result once loaded, or reject if the resource failed to load. The data is loaded
15542
+ * using XMLHttpRequest, which means that in order to make requests to another origin,
15543
+ * the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
15517
15544
  * @example
15518
15545
  * resource.patch(data)
15519
- .then(function(result) {
15520
- // use the result
15521
- }).otherwise(function(error) {
15522
- // an error occurred
15523
- });
15546
+ * .then(function(result) {
15547
+ * // use the result
15548
+ * }).catch(function(error) {
15549
+ * // an error occurred
15550
+ * });
15524
15551
  * @param data - Data that is posted with the resource.
15525
15552
  * @param [options] - Object with the following properties:
15526
15553
  * @param [options.responseType] - The type of response. This controls the type of item returned.
@@ -15624,7 +15651,7 @@ const positions = [
15624
15651
  Cesium.Cartographic.fromDegrees(87.0, 28.0)
15625
15652
  ];
15626
15653
  const promise = Cesium.sampleTerrain(terrainProvider, 11, positions);
15627
- Cesium.when(promise, function(updatedPositions) {
15654
+ Promise.resolve(promise).then(function(updatedPositions) {
15628
15655
  // positions[0].height and positions[1].height have been updated.
15629
15656
  // updatedPositions is just a reference to positions.
15630
15657
  });
@@ -15645,7 +15672,7 @@ const positions = [
15645
15672
  Cesium.Cartographic.fromDegrees(87.0, 28.0)
15646
15673
  ];
15647
15674
  const promise = Cesium.sampleTerrainMostDetailed(terrainProvider, positions);
15648
- Cesium.when(promise, function(updatedPositions) {
15675
+ Promise.resolve(promise).then(function(updatedPositions) {
15649
15676
  // positions[0].height and positions[1].height have been updated.
15650
15677
  // updatedPositions is just a reference to positions.
15651
15678
  });
@@ -16169,7 +16196,7 @@ export class TaskProcessor {
16169
16196
  if (!Cesium.defined(promise)) {
16170
16197
  // too many active tasks - try again later
16171
16198
  } else {
16172
- Cesium.when(promise, function(result) {
16199
+ promise.then(function(result) {
16173
16200
  // use the result of the task
16174
16201
  });
16175
16202
  }
@@ -17219,7 +17246,7 @@ export namespace Transforms {
17219
17246
  indicates that the preload has completed.
17220
17247
  * @example
17221
17248
  * const interval = new Cesium.TimeInterval(...);
17222
- when(Cesium.Transforms.preloadIcrfFixed(interval), function() {
17249
+ Promise.resolve(Cesium.Transforms.preloadIcrfFixed(interval)).then(function() {
17223
17250
  // the data is now loaded
17224
17251
  });
17225
17252
  * @param timeInterval - The interval to preload.
@@ -27166,16 +27193,21 @@ export class Cesium3DTileFeature {
27166
27193
  getProperty(name: string): any;
27167
27194
  /**
27168
27195
  * Returns a copy of the feature's property with the given name, examining all
27169
- the metadata from 3D Tiles 1.0 formats, the EXT_mesh_features and legacy
27170
- EXT_feature_metadata glTF extensions, and the 3DTILES_metadata 3D Tiles
27171
- extension. Metadata is checked against name from most specific to most
27172
- general and the first match is returned. Metadata is checked in this order:
27196
+ the metadata from 3D Tiles 1.0 formats, the EXT_structural_metadata and legacy
27197
+ EXT_feature_metadata glTF extensions, and the metadata present either in the
27198
+ tileset JSON (3D Tiles 1.1) or in the 3DTILES_metadata 3D Tiles extension.
27199
+ Metadata is checked against name from most specific to most general and the
27200
+ first match is returned. Metadata is checked in this order:
27173
27201
 
27174
27202
  <ol>
27175
- <li>Batch table (feature metadata) property by semantic</li>
27176
- <li>Batch table (feature metadata) property by property ID</li>
27203
+ <li>Batch table (structural metadata) property by semantic</li>
27204
+ <li>Batch table (structural metadata) property by property ID</li>
27205
+ <li>Content metadata property by semantic</li>
27206
+ <li>Content metadata property by property</li>
27177
27207
  <li>Tile metadata property by semantic</li>
27178
27208
  <li>Tile metadata property by property ID</li>
27209
+ <li>Subtree metadata property by semantic</li>
27210
+ <li>Subtree metadata property by property ID</li>
27179
27211
  <li>Group metadata property by semantic</li>
27180
27212
  <li>Group metadata property by property ID</li>
27181
27213
  <li>Tileset metadata property by semantic</li>
@@ -27184,7 +27216,7 @@ export class Cesium3DTileFeature {
27184
27216
  </ol>
27185
27217
  <p>
27186
27218
  For 3D Tiles Next details, see the {@link https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_metadata|3DTILES_metadata Extension}
27187
- for 3D Tiles, as well as the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features Extension}
27219
+ for 3D Tiles, as well as the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension}
27188
27220
  for glTF. For the legacy glTF extension, see {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension}
27189
27221
  </p>
27190
27222
  * @param content - The content for accessing the metadata
@@ -27458,32 +27490,32 @@ export class Cesium3DTilePointFeature {
27458
27490
 
27459
27491
  /**
27460
27492
  * A {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
27461
- used for streaming massive heterogeneous 3D geospatial datasets.
27493
+ * used for streaming massive heterogeneous 3D geospatial datasets.
27462
27494
  * @example
27463
27495
  * const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27464
- url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
27465
- }));
27496
+ * url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
27497
+ * }));
27466
27498
  * @example
27467
27499
  * // Common setting for the skipLevelOfDetail optimization
27468
- const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27469
- url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
27470
- skipLevelOfDetail : true,
27471
- baseScreenSpaceError : 1024,
27472
- skipScreenSpaceErrorFactor : 16,
27473
- skipLevels : 1,
27474
- immediatelyLoadDesiredLevelOfDetail : false,
27475
- loadSiblings : false,
27476
- cullWithChildrenBounds : true
27477
- }));
27500
+ * const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27501
+ * url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
27502
+ * skipLevelOfDetail : true,
27503
+ * baseScreenSpaceError : 1024,
27504
+ * skipScreenSpaceErrorFactor : 16,
27505
+ * skipLevels : 1,
27506
+ * immediatelyLoadDesiredLevelOfDetail : false,
27507
+ * loadSiblings : false,
27508
+ * cullWithChildrenBounds : true
27509
+ * }));
27478
27510
  * @example
27479
27511
  * // Common settings for the dynamicScreenSpaceError optimization
27480
- const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27481
- url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
27482
- dynamicScreenSpaceError : true,
27483
- dynamicScreenSpaceErrorDensity : 0.00278,
27484
- dynamicScreenSpaceErrorFactor : 4.0,
27485
- dynamicScreenSpaceErrorHeightFalloff : 0.25
27486
- }));
27512
+ * const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27513
+ * url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
27514
+ * dynamicScreenSpaceError : true,
27515
+ * dynamicScreenSpaceErrorDensity : 0.00278,
27516
+ * dynamicScreenSpaceErrorFactor : 4.0,
27517
+ * dynamicScreenSpaceErrorHeightFalloff : 0.25
27518
+ * }));
27487
27519
  * @param options - Object with the following properties:
27488
27520
  * @param options.url - The url to a tileset JSON file.
27489
27521
  * @param [options.show = true] - Determines if the tileset will be shown.
@@ -27517,18 +27549,20 @@ const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
27517
27549
  * @param [options.classificationType] - Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations.
27518
27550
  * @param [options.ellipsoid = Ellipsoid.WGS84] - The ellipsoid determining the size and shape of the globe.
27519
27551
  * @param [options.pointCloudShading] - Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
27520
- * @param [options.imageBasedLightingFactor = new Cartesian2(1.0, 1.0)] - Scales the diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
27521
27552
  * @param [options.lightColor] - The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
27522
- * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
27523
- * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
27524
- * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
27553
+ * @param [options.imageBasedLighting] - The properties for managing image-based lighting for this tileset.
27554
+ * @param [options.imageBasedLightingFactor = new Cartesian2(1.0, 1.0)] - Scales the diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
27555
+ * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
27556
+ * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
27557
+ * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
27525
27558
  * @param [options.backFaceCulling = true] - Whether to cull back-facing geometry. When true, back face culling is determined by the glTF material's doubleSided property; when false, back face culling is disabled.
27526
27559
  * @param [options.showOutline = true] - Whether to display the outline for models using the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. When true, outlines are displayed. When false, outlines are not displayed.
27527
27560
  * @param [options.vectorClassificationOnly = false] - Indicates that only the tileset's vector tiles should be used for classification.
27528
27561
  * @param [options.vectorKeepDecodedPositions = false] - Whether vector tiles should keep decoded positions in memory. This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
27529
- * @param [options.featureIdIndex = 0] - The index into the list of primitive feature IDs used for picking and styling. For EXT_feature_metadata, feature ID attributes are listed before feature ID textures. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
27530
- * @param [options.instanceFeatureIdIndex = 0] - The index into the list of instance feature IDs used for picking and styling. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
27562
+ * @param [options.featureIdLabel = "featureId_0"] - Label of the feature ID set to use for picking and styling. For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures. If featureIdLabel is an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
27563
+ * @param [options.instanceFeatureIdLabel = "instanceFeatureId_0"] - Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
27531
27564
  * @param [options.showCreditsOnScreen = false] - Whether to display the credits of this tileset on screen.
27565
+ * @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this tileset.
27532
27566
  * @param [options.debugHeatmapTilePropertyName] - The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value.
27533
27567
  * @param [options.debugFreezeFrame = false] - For debugging only. Determines if only the tiles from last frame should be used for rendering.
27534
27568
  * @param [options.debugColorizeTiles = false] - For debugging only. When true, assigns a random color to each tile.
@@ -27575,8 +27609,9 @@ export class Cesium3DTileset {
27575
27609
  classificationType?: ClassificationType;
27576
27610
  ellipsoid?: Ellipsoid;
27577
27611
  pointCloudShading?: any;
27578
- imageBasedLightingFactor?: Cartesian2;
27579
27612
  lightColor?: Cartesian3;
27613
+ imageBasedLighting?: ImageBasedLighting;
27614
+ imageBasedLightingFactor?: Cartesian2;
27580
27615
  luminanceAtZenith?: number;
27581
27616
  sphericalHarmonicCoefficients?: Cartesian3[];
27582
27617
  specularEnvironmentMaps?: string;
@@ -27584,9 +27619,10 @@ export class Cesium3DTileset {
27584
27619
  showOutline?: boolean;
27585
27620
  vectorClassificationOnly?: boolean;
27586
27621
  vectorKeepDecodedPositions?: boolean;
27587
- featureIdIndex?: number;
27588
- instanceFeatureIdIndex?: number;
27622
+ featureIdLabel?: string | number;
27623
+ instanceFeatureIdLabel?: string | number;
27589
27624
  showCreditsOnScreen?: boolean;
27625
+ splitDirection?: SplitDirection;
27590
27626
  debugHeatmapTilePropertyName?: string;
27591
27627
  debugFreezeFrame?: boolean;
27592
27628
  debugColorizeTiles?: boolean;
@@ -27625,68 +27661,68 @@ export class Cesium3DTileset {
27625
27661
  preloadFlightDestinations: boolean;
27626
27662
  /**
27627
27663
  * Optimization option. Whether the tileset should refine based on a dynamic screen space error. Tiles that are further
27628
- away will be rendered with lower detail than closer tiles. This improves performance by rendering fewer
27629
- tiles and making less requests, but may result in a slight drop in visual quality for tiles in the distance.
27630
- The algorithm is biased towards "street views" where the camera is close to the ground plane of the tileset and looking
27631
- at the horizon. In addition results are more accurate for tightly fitting bounding volumes like box and region.
27664
+ * away will be rendered with lower detail than closer tiles. This improves performance by rendering fewer
27665
+ * tiles and making less requests, but may result in a slight drop in visual quality for tiles in the distance.
27666
+ * The algorithm is biased towards "street views" where the camera is close to the ground plane of the tileset and looking
27667
+ * at the horizon. In addition results are more accurate for tightly fitting bounding volumes like box and region.
27632
27668
  */
27633
27669
  dynamicScreenSpaceError: boolean;
27634
27670
  /**
27635
27671
  * Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
27636
- screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
27637
- the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
27672
+ * screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
27673
+ * the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
27638
27674
  */
27639
27675
  foveatedScreenSpaceError: boolean;
27640
27676
  /**
27641
27677
  * Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
27642
- interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
27678
+ * interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
27643
27679
  */
27644
27680
  foveatedInterpolationCallback: Cesium3DTileset.foveatedInterpolationCallback;
27645
27681
  /**
27646
27682
  * Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control
27647
- how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
27648
- This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
27649
- Setting this to 0.0 will immediately request all tiles in any given view.
27683
+ * how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
27684
+ * This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
27685
+ * Setting this to 0.0 will immediately request all tiles in any given view.
27650
27686
  */
27651
27687
  foveatedTimeDelay: number;
27652
27688
  /**
27653
27689
  * A scalar that determines the density used to adjust the dynamic screen space error, similar to {@link Fog}. Increasing this
27654
- value has the effect of increasing the maximum screen space error for all tiles, but in a non-linear fashion.
27655
- The error starts at 0.0 and increases exponentially until a midpoint is reached, and then approaches 1.0 asymptotically.
27656
- This has the effect of keeping high detail in the closer tiles and lower detail in the further tiles, with all tiles
27657
- beyond a certain distance all roughly having an error of 1.0.
27658
- <p>
27659
- The dynamic error is in the range [0.0, 1.0) and is multiplied by <code>dynamicScreenSpaceErrorFactor</code> to produce the
27660
- final dynamic error. This dynamic error is then subtracted from the tile's actual screen space error.
27661
- </p>
27662
- <p>
27663
- Increasing <code>dynamicScreenSpaceErrorDensity</code> has the effect of moving the error midpoint closer to the camera.
27664
- It is analogous to moving fog closer to the camera.
27665
- </p>
27690
+ * value has the effect of increasing the maximum screen space error for all tiles, but in a non-linear fashion.
27691
+ * The error starts at 0.0 and increases exponentially until a midpoint is reached, and then approaches 1.0 asymptotically.
27692
+ * This has the effect of keeping high detail in the closer tiles and lower detail in the further tiles, with all tiles
27693
+ * beyond a certain distance all roughly having an error of 1.0.
27694
+ * <p>
27695
+ * The dynamic error is in the range [0.0, 1.0) and is multiplied by <code>dynamicScreenSpaceErrorFactor</code> to produce the
27696
+ * final dynamic error. This dynamic error is then subtracted from the tile's actual screen space error.
27697
+ * </p>
27698
+ * <p>
27699
+ * Increasing <code>dynamicScreenSpaceErrorDensity</code> has the effect of moving the error midpoint closer to the camera.
27700
+ * It is analogous to moving fog closer to the camera.
27701
+ * </p>
27666
27702
  */
27667
27703
  dynamicScreenSpaceErrorDensity: number;
27668
27704
  /**
27669
27705
  * A factor used to increase the screen space error of tiles for dynamic screen space error. As this value increases less tiles
27670
- are requested for rendering and tiles in the distance will have lower detail. If set to zero, the feature will be disabled.
27706
+ * are requested for rendering and tiles in the distance will have lower detail. If set to zero, the feature will be disabled.
27671
27707
  */
27672
27708
  dynamicScreenSpaceErrorFactor: number;
27673
27709
  /**
27674
27710
  * A ratio of the tileset's height at which the density starts to falloff. If the camera is below this height the
27675
- full computed density is applied, otherwise the density falls off. This has the effect of higher density at
27676
- street level views.
27677
- <p>
27678
- Valid values are between 0.0 and 1.0.
27679
- </p>
27711
+ * full computed density is applied, otherwise the density falls off. This has the effect of higher density at
27712
+ * street level views.
27713
+ * <p>
27714
+ * Valid values are between 0.0 and 1.0.
27715
+ * </p>
27680
27716
  */
27681
27717
  dynamicScreenSpaceErrorHeightFalloff: number;
27682
27718
  /**
27683
27719
  * Determines whether the tileset casts or receives shadows from light sources.
27684
- <p>
27685
- Enabling shadows has a performance impact. A tileset that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
27686
- </p>
27687
- <p>
27688
- Shadows are rendered only when {@link Viewer#shadows} is <code>true</code>.
27689
- </p>
27720
+ * <p>
27721
+ * Enabling shadows has a performance impact. A tileset that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
27722
+ * </p>
27723
+ * <p>
27724
+ * Shadows are rendered only when {@link Viewer#shadows} is <code>true</code>.
27725
+ * </p>
27690
27726
  */
27691
27727
  shadows: ShadowMode;
27692
27728
  /**
@@ -27695,344 +27731,305 @@ export class Cesium3DTileset {
27695
27731
  show: boolean;
27696
27732
  /**
27697
27733
  * Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
27698
- the original feature, e.g. glTF material or per-point color in the tile.
27734
+ * the original feature, e.g. glTF material or per-point color in the tile.
27699
27735
  */
27700
27736
  colorBlendMode: Cesium3DTileColorBlendMode;
27701
27737
  /**
27702
27738
  * Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is <code>MIX</code>.
27703
- A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
27704
- resulting in a mix of the source color and feature color.
27739
+ * A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
27740
+ * resulting in a mix of the source color and feature color.
27705
27741
  */
27706
27742
  colorBlendAmount: number;
27707
27743
  /**
27708
27744
  * The event fired to indicate progress of loading new tiles. This event is fired when a new tile
27709
- is requested, when a requested tile is finished downloading, and when a downloaded tile has been
27710
- processed and is ready to render.
27711
- <p>
27712
- The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
27713
- processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
27714
- </p>
27715
- <p>
27716
- This event is fired at the end of the frame after the scene is rendered.
27717
- </p>
27745
+ * is requested, when a requested tile is finished downloading, and when a downloaded tile has been
27746
+ * processed and is ready to render.
27747
+ * <p>
27748
+ * The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
27749
+ * processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
27750
+ * </p>
27751
+ * <p>
27752
+ * This event is fired at the end of the frame after the scene is rendered.
27753
+ * </p>
27718
27754
  * @example
27719
27755
  * tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
27720
- if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
27721
- console.log('Stopped loading');
27722
- return;
27723
- }
27724
-
27725
- console.log('Loading: requests: ' + numberOfPendingRequests + ', processing: ' + numberOfTilesProcessing);
27726
- });
27756
+ * if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
27757
+ * console.log('Stopped loading');
27758
+ * return;
27759
+ * }
27760
+ *
27761
+ * console.log('Loading: requests: ' + numberOfPendingRequests + ', processing: ' + numberOfTilesProcessing);
27762
+ * });
27727
27763
  */
27728
27764
  loadProgress: Event;
27729
27765
  /**
27730
27766
  * The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset
27731
- is completely loaded for this view.
27732
- <p>
27733
- This event is fired at the end of the frame after the scene is rendered.
27734
- </p>
27767
+ * is completely loaded for this view.
27768
+ * <p>
27769
+ * This event is fired at the end of the frame after the scene is rendered.
27770
+ * </p>
27735
27771
  * @example
27736
27772
  * tileset.allTilesLoaded.addEventListener(function() {
27737
- console.log('All tiles are loaded');
27738
- });
27773
+ * console.log('All tiles are loaded');
27774
+ * });
27739
27775
  */
27740
27776
  allTilesLoaded: Event;
27741
27777
  /**
27742
27778
  * The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
27743
- is fired once when all tiles in the initial view are loaded.
27744
- <p>
27745
- This event is fired at the end of the frame after the scene is rendered.
27746
- </p>
27779
+ * is fired once when all tiles in the initial view are loaded.
27780
+ * <p>
27781
+ * This event is fired at the end of the frame after the scene is rendered.
27782
+ * </p>
27747
27783
  * @example
27748
27784
  * tileset.initialTilesLoaded.addEventListener(function() {
27749
- console.log('Initial tiles are loaded');
27750
- });
27785
+ * console.log('Initial tiles are loaded');
27786
+ * });
27751
27787
  */
27752
27788
  initialTilesLoaded: Event;
27753
27789
  /**
27754
27790
  * The event fired to indicate that a tile's content was loaded.
27755
- <p>
27756
- The loaded {@link Cesium3DTile} is passed to the event listener.
27757
- </p>
27758
- <p>
27759
- This event is fired during the tileset traversal while the frame is being rendered
27760
- so that updates to the tile take effect in the same frame. Do not create or modify
27761
- Cesium entities or primitives during the event listener.
27762
- </p>
27791
+ * <p>
27792
+ * The loaded {@link Cesium3DTile} is passed to the event listener.
27793
+ * </p>
27794
+ * <p>
27795
+ * This event is fired during the tileset traversal while the frame is being rendered
27796
+ * so that updates to the tile take effect in the same frame. Do not create or modify
27797
+ * Cesium entities or primitives during the event listener.
27798
+ * </p>
27763
27799
  * @example
27764
27800
  * tileset.tileLoad.addEventListener(function(tile) {
27765
- console.log('A tile was loaded.');
27766
- });
27801
+ * console.log('A tile was loaded.');
27802
+ * });
27767
27803
  */
27768
27804
  tileLoad: Event;
27769
27805
  /**
27770
27806
  * The event fired to indicate that a tile's content was unloaded.
27771
- <p>
27772
- The unloaded {@link Cesium3DTile} is passed to the event listener.
27773
- </p>
27774
- <p>
27775
- This event is fired immediately before the tile's content is unloaded while the frame is being
27776
- rendered so that the event listener has access to the tile's content. Do not create
27777
- or modify Cesium entities or primitives during the event listener.
27778
- </p>
27807
+ * <p>
27808
+ * The unloaded {@link Cesium3DTile} is passed to the event listener.
27809
+ * </p>
27810
+ * <p>
27811
+ * This event is fired immediately before the tile's content is unloaded while the frame is being
27812
+ * rendered so that the event listener has access to the tile's content. Do not create
27813
+ * or modify Cesium entities or primitives during the event listener.
27814
+ * </p>
27779
27815
  * @example
27780
27816
  * tileset.tileUnload.addEventListener(function(tile) {
27781
- console.log('A tile was unloaded from the cache.');
27782
- });
27817
+ * console.log('A tile was unloaded from the cache.');
27818
+ * });
27783
27819
  */
27784
27820
  tileUnload: Event;
27785
27821
  /**
27786
27822
  * The event fired to indicate that a tile's content failed to load.
27787
- <p>
27788
- If there are no event listeners, error messages will be logged to the console.
27789
- </p>
27790
- <p>
27791
- The error object passed to the listener contains two properties:
27792
- <ul>
27793
- <li><code>url</code>: the url of the failed tile.</li>
27794
- <li><code>message</code>: the error message.</li>
27795
- </ul>
27796
- <p>
27797
- If the <code>3DTILES_multiple_contents</code> extension is used, this event is raised once per inner content with errors.
27798
- </p>
27823
+ * <p>
27824
+ * If there are no event listeners, error messages will be logged to the console.
27825
+ * </p>
27826
+ * <p>
27827
+ * The error object passed to the listener contains two properties:
27828
+ * <ul>
27829
+ * <li><code>url</code>: the url of the failed tile.</li>
27830
+ * <li><code>message</code>: the error message.</li>
27831
+ * </ul>
27832
+ * <p>
27833
+ * If multiple contents are present, this event is raised once per inner content with errors.
27834
+ * </p>
27799
27835
  * @example
27800
27836
  * tileset.tileFailed.addEventListener(function(error) {
27801
- console.log('An error occurred loading tile: ' + error.url);
27802
- console.log('Error: ' + error.message);
27803
- });
27837
+ * console.log('An error occurred loading tile: ' + error.url);
27838
+ * console.log('Error: ' + error.message);
27839
+ * });
27804
27840
  */
27805
27841
  tileFailed: Event;
27806
27842
  /**
27807
27843
  * This event fires once for each visible tile in a frame. This can be used to manually
27808
- style a tileset.
27809
- <p>
27810
- The visible {@link Cesium3DTile} is passed to the event listener.
27811
- </p>
27812
- <p>
27813
- This event is fired during the tileset traversal while the frame is being rendered
27814
- so that updates to the tile take effect in the same frame. Do not create or modify
27815
- Cesium entities or primitives during the event listener.
27816
- </p>
27844
+ * style a tileset.
27845
+ * <p>
27846
+ * The visible {@link Cesium3DTile} is passed to the event listener.
27847
+ * </p>
27848
+ * <p>
27849
+ * This event is fired during the tileset traversal while the frame is being rendered
27850
+ * so that updates to the tile take effect in the same frame. Do not create or modify
27851
+ * Cesium entities or primitives during the event listener.
27852
+ * </p>
27817
27853
  * @example
27818
27854
  * tileset.tileVisible.addEventListener(function(tile) {
27819
- if (tile.content instanceof Cesium.Batched3DModel3DTileContent) {
27820
- console.log('A Batched 3D Model tile is visible.');
27821
- }
27822
- });
27855
+ * if (tile.content instanceof Cesium.Batched3DModel3DTileContent) {
27856
+ * console.log('A Batched 3D Model tile is visible.');
27857
+ * }
27858
+ * });
27823
27859
  * @example
27824
27860
  * // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
27825
- tileset.style = new Cesium.Cesium3DTileStyle({
27826
- color : 'color("red")'
27827
- });
27828
- tileset.tileVisible.addEventListener(function(tile) {
27829
- const content = tile.content;
27830
- const featuresLength = content.featuresLength;
27831
- for (let i = 0; i < featuresLength; i+=2) {
27832
- content.getFeature(i).color = Cesium.Color.fromRandom();
27833
- }
27834
- });
27861
+ * tileset.style = new Cesium.Cesium3DTileStyle({
27862
+ * color : 'color("red")'
27863
+ * });
27864
+ * tileset.tileVisible.addEventListener(function(tile) {
27865
+ * const content = tile.content;
27866
+ * const featuresLength = content.featuresLength;
27867
+ * for (let i = 0; i < featuresLength; i+=2) {
27868
+ * content.getFeature(i).color = Cesium.Color.fromRandom();
27869
+ * }
27870
+ * });
27835
27871
  */
27836
27872
  tileVisible: Event;
27837
27873
  /**
27838
27874
  * Optimization option. Determines if level of detail skipping should be applied during the traversal.
27839
- <p>
27840
- The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require
27841
- all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped
27842
- entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
27843
- using this optimization.
27844
- </p>
27875
+ * <p>
27876
+ * The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require
27877
+ * all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped
27878
+ * entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
27879
+ * using this optimization.
27880
+ * </p>
27845
27881
  */
27846
27882
  skipLevelOfDetail: boolean;
27847
27883
  /**
27848
27884
  * The screen space error that must be reached before skipping levels of detail.
27849
- <p>
27850
- Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27851
- </p>
27885
+ * <p>
27886
+ * Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27887
+ * </p>
27852
27888
  */
27853
27889
  baseScreenSpaceError: number;
27854
27890
  /**
27855
27891
  * Multiplier defining the minimum screen space error to skip.
27856
- For example, if a tile has screen space error of 100, no tiles will be loaded unless they
27857
- are leaves or have a screen space error <code><= 100 / skipScreenSpaceErrorFactor</code>.
27858
- <p>
27859
- Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27860
- </p>
27892
+ * For example, if a tile has screen space error of 100, no tiles will be loaded unless they
27893
+ * are leaves or have a screen space error <code><= 100 / skipScreenSpaceErrorFactor</code>.
27894
+ * <p>
27895
+ * Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27896
+ * </p>
27861
27897
  */
27862
27898
  skipScreenSpaceErrorFactor: number;
27863
27899
  /**
27864
27900
  * Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped.
27865
- For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.
27866
- <p>
27867
- Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27868
- </p>
27901
+ * For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.
27902
+ * <p>
27903
+ * Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27904
+ * </p>
27869
27905
  */
27870
27906
  skipLevels: number;
27871
27907
  /**
27872
27908
  * When true, only tiles that meet the maximum screen space error will ever be downloaded.
27873
- Skipping factors are ignored and just the desired tiles are loaded.
27874
- <p>
27875
- Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27876
- </p>
27909
+ * Skipping factors are ignored and just the desired tiles are loaded.
27910
+ * <p>
27911
+ * Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27912
+ * </p>
27877
27913
  */
27878
27914
  immediatelyLoadDesiredLevelOfDetail: boolean;
27879
27915
  /**
27880
27916
  * Determines whether siblings of visible tiles are always downloaded during traversal.
27881
- This may be useful for ensuring that tiles are already available when the viewer turns left/right.
27882
- <p>
27883
- Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27884
- </p>
27917
+ * This may be useful for ensuring that tiles are already available when the viewer turns left/right.
27918
+ * <p>
27919
+ * Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
27920
+ * </p>
27885
27921
  */
27886
27922
  loadSiblings: boolean;
27887
27923
  /**
27888
27924
  * The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
27889
- <p>
27890
- For example, disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code> will make the
27891
- model much darker. Here, increasing the intensity of the light source will make the model brighter.
27892
- </p>
27925
+ * <p>
27926
+ * For example, disabling additional light sources by setting <code>model.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code> will make the
27927
+ * model much darker. Here, increasing the intensity of the light source will make the model brighter.
27928
+ * </p>
27893
27929
  */
27894
27930
  lightColor: Cartesian3;
27895
- /**
27896
- * The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
27897
- This is used when {@link Cesium3DTileset#specularEnvironmentMaps} and {@link Cesium3DTileset#sphericalHarmonicCoefficients} are not defined.
27898
- */
27899
- luminanceAtZenith: number;
27900
- /**
27901
- * The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
27902
- computed from the atmosphere color is used.
27903
- <p>
27904
- There are nine <code>Cartesian3</code> coefficients.
27905
- The order of the coefficients is: L<sub>00</sub>, L<sub>1-1</sub>, L<sub>10</sub>, L<sub>11</sub>, L<sub>2-2</sub>, L<sub>2-1</sub>, L<sub>20</sub>, L<sub>21</sub>, L<sub>22</sub>
27906
- </p>
27907
-
27908
- These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
27909
- {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
27910
- supplied to {@link Cesium3DTileset#specularEnvironmentMaps}.
27911
- */
27912
- sphericalHarmonicCoefficients: Cartesian3[];
27913
- /**
27914
- * A URL to a KTX file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
27915
- */
27916
- specularEnvironmentMaps: string;
27917
27931
  /**
27918
27932
  * Whether to cull back-facing geometry. When true, back face culling is determined
27919
- by the glTF material's doubleSided property; when false, back face culling is disabled.
27933
+ * by the glTF material's doubleSided property; when false, back face culling is disabled.
27920
27934
  */
27921
27935
  backFaceCulling: boolean;
27922
27936
  /**
27923
27937
  * Whether to display the outline for models using the
27924
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
27925
- When true, outlines are displayed. When false, outlines are not displayed.
27938
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
27939
+ * When true, outlines are displayed. When false, outlines are not displayed.
27926
27940
  */
27927
27941
  readonly showOutline: boolean;
27942
+ /**
27943
+ * The {@link SplitDirection} to apply to this tileset.
27944
+ */
27945
+ splitDirection: SplitDirection;
27928
27946
  /**
27929
27947
  * This property is for debugging only; it is not optimized for production use.
27930
- <p>
27931
- Determines if only the tiles from last frame should be used for rendering. This
27932
- effectively "freezes" the tileset to the previous frame so it is possible to zoom
27933
- out and see what was rendered.
27934
- </p>
27948
+ * <p>
27949
+ * Determines if only the tiles from last frame should be used for rendering. This
27950
+ * effectively "freezes" the tileset to the previous frame so it is possible to zoom
27951
+ * out and see what was rendered.
27952
+ * </p>
27935
27953
  */
27936
27954
  debugFreezeFrame: boolean;
27937
27955
  /**
27938
27956
  * This property is for debugging only; it is not optimized for production use.
27939
- <p>
27940
- When true, assigns a random color to each tile. This is useful for visualizing
27941
- what features belong to what tiles, especially with additive refinement where features
27942
- from parent tiles may be interleaved with features from child tiles.
27943
- </p>
27957
+ * <p>
27958
+ * When true, assigns a random color to each tile. This is useful for visualizing
27959
+ * what features belong to what tiles, especially with additive refinement where features
27960
+ * from parent tiles may be interleaved with features from child tiles.
27961
+ * </p>
27944
27962
  */
27945
27963
  debugColorizeTiles: boolean;
27946
27964
  /**
27947
27965
  * This property is for debugging only; it is not optimized for production use.
27948
- <p>
27949
- When true, renders each tile's content as a wireframe.
27950
- </p>
27966
+ * <p>
27967
+ * When true, renders each tile's content as a wireframe.
27968
+ * </p>
27951
27969
  */
27952
27970
  debugWireframe: boolean;
27953
27971
  /**
27954
27972
  * This property is for debugging only; it is not optimized for production use.
27955
- <p>
27956
- When true, renders the bounding volume for each visible tile. The bounding volume is
27957
- white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the
27958
- screen space error and are still refining to their descendants are yellow.
27959
- </p>
27973
+ * <p>
27974
+ * When true, renders the bounding volume for each visible tile. The bounding volume is
27975
+ * white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the
27976
+ * screen space error and are still refining to their descendants are yellow.
27977
+ * </p>
27960
27978
  */
27961
27979
  debugShowBoundingVolume: boolean;
27962
27980
  /**
27963
27981
  * This property is for debugging only; it is not optimized for production use.
27964
- <p>
27965
- When true, renders the bounding volume for each visible tile's content. The bounding volume is
27966
- blue if the tile has a content bounding volume; otherwise it is red.
27967
- </p>
27982
+ * <p>
27983
+ * When true, renders the bounding volume for each visible tile's content. The bounding volume is
27984
+ * blue if the tile has a content bounding volume; otherwise it is red.
27985
+ * </p>
27968
27986
  */
27969
27987
  debugShowContentBoundingVolume: boolean;
27970
27988
  /**
27971
27989
  * This property is for debugging only; it is not optimized for production use.
27972
- <p>
27973
- When true, renders the viewer request volume for each tile.
27974
- </p>
27990
+ * <p>
27991
+ * When true, renders the viewer request volume for each tile.
27992
+ * </p>
27975
27993
  */
27976
27994
  debugShowViewerRequestVolume: boolean;
27977
27995
  /**
27978
27996
  * This property is for debugging only; it is not optimized for production use.
27979
- <p>
27980
- When true, draws labels to indicate the geometric error of each tile.
27981
- </p>
27997
+ * <p>
27998
+ * When true, draws labels to indicate the geometric error of each tile.
27999
+ * </p>
27982
28000
  */
27983
28001
  debugShowGeometricError: boolean;
27984
28002
  /**
27985
28003
  * This property is for debugging only; it is not optimized for production use.
27986
- <p>
27987
- When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
27988
- </p>
28004
+ * <p>
28005
+ * When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
28006
+ * </p>
27989
28007
  */
27990
28008
  debugShowRenderingStatistics: boolean;
27991
28009
  /**
27992
28010
  * This property is for debugging only; it is not optimized for production use.
27993
- <p>
27994
- When true, draws labels to indicate the geometry and texture memory usage of each tile.
27995
- </p>
28011
+ * <p>
28012
+ * When true, draws labels to indicate the geometry and texture memory usage of each tile.
28013
+ * </p>
27996
28014
  */
27997
28015
  debugShowMemoryUsage: boolean;
27998
28016
  /**
27999
28017
  * This property is for debugging only; it is not optimized for production use.
28000
- <p>
28001
- When true, draws labels to indicate the url of each tile.
28002
- </p>
28018
+ * <p>
28019
+ * When true, draws labels to indicate the url of each tile.
28020
+ * </p>
28003
28021
  */
28004
28022
  debugShowUrl: boolean;
28005
28023
  /**
28006
28024
  * Function for examining vector lines as they are being streamed.
28007
28025
  */
28008
28026
  examineVectorLinesFunction: (...params: any[]) => any;
28009
- /**
28010
- * If true, {@link ModelExperimental} will be used instead of {@link Model}
28011
- for each tile with a glTF or 3D Tiles 1.0 content (where applicable).
28012
- <p>
28013
- The value defaults to {@link ExperimentalFeatures.enableModelExperimental}.
28014
- </p>
28015
- */
28016
- enableModelExperimental: boolean;
28017
- /**
28018
- * The index into the list of primitive feature IDs used for picking and
28019
- styling. For EXT_feature_metadata, feature ID attributes are listed before
28020
- feature ID textures. If both per-primitive and per-instance feature IDs are
28021
- present, the instance feature IDs take priority.
28022
- */
28023
- featureIdIndex: number;
28024
- /**
28025
- * The index into the list of instance feature IDs used for picking and
28026
- styling. If both per-primitive and per-instance feature IDs are present,
28027
- the instance feature IDs take priority.
28028
- */
28029
- instanceFeatureIdIndex: number;
28030
28027
  /**
28031
28028
  * Gets the tileset's asset object property, which contains metadata about the tileset.
28032
- <p>
28033
- See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference}
28034
- in the 3D Tiles spec for the full set of properties.
28035
- </p>
28029
+ * <p>
28030
+ * See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference}
28031
+ * in the 3D Tiles spec for the full set of properties.
28032
+ * </p>
28036
28033
  */
28037
28034
  readonly asset: any;
28038
28035
  /**
@@ -28045,40 +28042,40 @@ export class Cesium3DTileset {
28045
28042
  clippingPlanes: ClippingPlaneCollection;
28046
28043
  /**
28047
28044
  * Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
28048
- <p>
28049
- See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference}
28050
- in the 3D Tiles spec for the full set of properties.
28051
- </p>
28045
+ * <p>
28046
+ * See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference}
28047
+ * in the 3D Tiles spec for the full set of properties.
28048
+ * </p>
28052
28049
  * @example
28053
28050
  * console.log('Maximum building height: ' + tileset.properties.height.maximum);
28054
- console.log('Minimum building height: ' + tileset.properties.height.minimum);
28051
+ * console.log('Minimum building height: ' + tileset.properties.height.minimum);
28055
28052
  */
28056
28053
  readonly properties: any;
28057
28054
  /**
28058
28055
  * When <code>true</code>, the tileset's root tile is loaded and the tileset is ready to render.
28059
- This is set to <code>true</code> right before {@link Cesium3DTileset#readyPromise} is resolved.
28056
+ * This is set to <code>true</code> right before {@link Cesium3DTileset#readyPromise} is resolved.
28060
28057
  */
28061
28058
  readonly ready: boolean;
28062
28059
  /**
28063
28060
  * Gets the promise that will be resolved when the tileset's root tile is loaded and the tileset is ready to render.
28064
- <p>
28065
- This promise is resolved at the end of the frame before the first frame the tileset is rendered in.
28066
- </p>
28061
+ * <p>
28062
+ * This promise is resolved at the end of the frame before the first frame the tileset is rendered in.
28063
+ * </p>
28067
28064
  * @example
28068
28065
  * tileset.readyPromise.then(function(tileset) {
28069
- // tile.properties is not defined until readyPromise resolves.
28070
- const properties = tileset.properties;
28071
- if (Cesium.defined(properties)) {
28072
- for (const name in properties) {
28073
- console.log(properties[name]);
28074
- }
28075
- }
28076
- });
28066
+ * // tile.properties is not defined until readyPromise resolves.
28067
+ * const properties = tileset.properties;
28068
+ * if (Cesium.defined(properties)) {
28069
+ * for (const name in properties) {
28070
+ * console.log(properties[name]);
28071
+ * }
28072
+ * }
28073
+ * });
28077
28074
  */
28078
28075
  readonly readyPromise: Promise<Cesium3DTileset>;
28079
28076
  /**
28080
28077
  * When <code>true</code>, all tiles that meet the screen space error this frame are loaded. The tileset is
28081
- completely loaded for this view.
28078
+ * completely loaded for this view.
28082
28079
  */
28083
28080
  readonly tilesLoaded: boolean;
28084
28081
  /**
@@ -28091,82 +28088,82 @@ export class Cesium3DTileset {
28091
28088
  readonly basePath: string;
28092
28089
  /**
28093
28090
  * The style, defined using the
28094
- {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language},
28095
- applied to each feature in the tileset.
28096
- <p>
28097
- Assign <code>undefined</code> to remove the style, which will restore the visual
28098
- appearance of the tileset to its default when no style was applied.
28099
- </p>
28100
- <p>
28101
- The style is applied to a tile before the {@link Cesium3DTileset#tileVisible}
28102
- event is raised, so code in <code>tileVisible</code> can manually set a feature's
28103
- properties (e.g. color and show) after the style is applied. When
28104
- a new style is assigned any manually set properties are overwritten.
28105
- </p>
28106
- <p>
28107
- Use an always "true" condition to specify the Color for all objects that are not
28108
- overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White
28109
- will be used. Similarly, use an always "true" condition to specify the show property
28110
- for all objects that are not overridden by pre-existing conditions. Otherwise, the
28111
- default show value true will be used.
28112
- </p>
28091
+ * {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language},
28092
+ * applied to each feature in the tileset.
28093
+ * <p>
28094
+ * Assign <code>undefined</code> to remove the style, which will restore the visual
28095
+ * appearance of the tileset to its default when no style was applied.
28096
+ * </p>
28097
+ * <p>
28098
+ * The style is applied to a tile before the {@link Cesium3DTileset#tileVisible}
28099
+ * event is raised, so code in <code>tileVisible</code> can manually set a feature's
28100
+ * properties (e.g. color and show) after the style is applied. When
28101
+ * a new style is assigned any manually set properties are overwritten.
28102
+ * </p>
28103
+ * <p>
28104
+ * Use an always "true" condition to specify the Color for all objects that are not
28105
+ * overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White
28106
+ * will be used. Similarly, use an always "true" condition to specify the show property
28107
+ * for all objects that are not overridden by pre-existing conditions. Otherwise, the
28108
+ * default show value true will be used.
28109
+ * </p>
28113
28110
  * @example
28114
28111
  * tileset.style = new Cesium.Cesium3DTileStyle({
28115
- color : {
28116
- conditions : [
28117
- ['${Height} >= 100', 'color("purple", 0.5)'],
28118
- ['${Height} >= 50', 'color("red")'],
28119
- ['true', 'color("blue")']
28120
- ]
28121
- },
28122
- show : '${Height} > 0',
28123
- meta : {
28124
- description : '"Building id ${id} has height ${Height}."'
28125
- }
28126
- });
28112
+ * color : {
28113
+ * conditions : [
28114
+ * ['${Height} >= 100', 'color("purple", 0.5)'],
28115
+ * ['${Height} >= 50', 'color("red")'],
28116
+ * ['true', 'color("blue")']
28117
+ * ]
28118
+ * },
28119
+ * show : '${Height} > 0',
28120
+ * meta : {
28121
+ * description : '"Building id ${id} has height ${Height}."'
28122
+ * }
28123
+ * });
28127
28124
  */
28128
28125
  style: Cesium3DTileStyle | undefined;
28129
28126
  /**
28130
28127
  * A custom shader to apply to all tiles in the tileset. Only used for
28131
- contents that use {@link ModelExperimental}. Using custom shaders with a
28132
- {@link Cesium3DTileStyle} may lead to undefined behavior.
28133
- <p>
28134
- To enable {@link ModelExperimental}, set {@link ExperimentalFeatures.enableModelExperimental} or tileset.enableModelExperimental to <code>true</code>.
28135
- </p>
28128
+ * contents that use {@link ModelExperimental}. Using custom shaders with a
28129
+ * {@link Cesium3DTileStyle} may lead to undefined behavior.
28130
+ * <p>
28131
+ * To enable {@link ModelExperimental}, set {@link ExperimentalFeatures.enableModelExperimental} or tileset.enableModelExperimental to <code>true</code>.
28132
+ * </p>
28136
28133
  */
28137
28134
  customShader: CustomShader | undefined;
28138
28135
  /**
28139
28136
  * The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
28140
- refines to its descendants, and therefore plays a major role in balancing performance with visual quality.
28141
- <p>
28142
- A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
28143
- radius equal to the tile's <b>geometric error</b> were rendered at the tile's position. If this value exceeds
28144
- <code>maximumScreenSpaceError</code> the tile refines to its descendants.
28145
- </p>
28146
- <p>
28147
- Depending on the tileset, <code>maximumScreenSpaceError</code> may need to be tweaked to achieve the right balance.
28148
- Higher values provide better performance but lower visual quality.
28149
- </p>
28137
+ * refines to its descendants, and therefore plays a major role in balancing performance with visual quality.
28138
+ * <p>
28139
+ * A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
28140
+ * radius equal to the tile's <b>geometric error</b> were rendered at the tile's position. If this value exceeds
28141
+ * <code>maximumScreenSpaceError</code> the tile refines to its descendants.
28142
+ * </p>
28143
+ * <p>
28144
+ * Depending on the tileset, <code>maximumScreenSpaceError</code> may need to be tweaked to achieve the right balance.
28145
+ * Higher values provide better performance but lower visual quality.
28146
+ * </p>
28150
28147
  */
28151
28148
  maximumScreenSpaceError: number;
28152
28149
  /**
28153
28150
  * The maximum amount of GPU memory (in MB) that may be used to cache tiles. This value is estimated from
28154
- geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also
28155
- includes per-point metadata.
28156
- <p>
28157
- Tiles not in view are unloaded to enforce this.
28158
- </p>
28159
- <p>
28160
- If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
28161
- </p>
28162
- <p>
28163
- If tiles sized more than <code>maximumMemoryUsage</code> are needed
28164
- to meet the desired screen space error, determined by {@link Cesium3DTileset#maximumScreenSpaceError},
28165
- for the current view, then the memory usage of the tiles loaded will exceed
28166
- <code>maximumMemoryUsage</code>. For example, if the maximum is 256 MB, but
28167
- 300 MB of tiles are needed to meet the screen space error, then 300 MB of tiles may be loaded. When
28168
- these tiles go out of view, they will be unloaded.
28169
- </p>
28151
+ * geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also
28152
+ * includes per-point metadata.
28153
+ * <p>
28154
+ * Tiles not in view are unloaded to enforce this.
28155
+ * </p>
28156
+ * <p>
28157
+ * If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
28158
+ * </p>
28159
+ * <p>
28160
+ * If tiles sized more than <code>maximumMemoryUsage</code> are needed
28161
+ * to meet the desired screen space error, determined by {@link Cesium3DTileset#maximumScreenSpaceError},
28162
+ * for the current view, then the memory usage of the tiles loaded will exceed
28163
+ * <code>maximumMemoryUsage</code>. For example, if the maximum is 256 MB, but
28164
+ * 300 MB of tiles are needed to meet the screen space error, then 300 MB of tiles may be loaded. When
28165
+ * these tiles go out of view, they will be unloaded.
28166
+ * </p>
28170
28167
  */
28171
28168
  maximumMemoryUsage: number;
28172
28169
  /**
@@ -28181,26 +28178,26 @@ export class Cesium3DTileset {
28181
28178
  * The tileset's bounding sphere.
28182
28179
  * @example
28183
28180
  * const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
28184
- url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
28185
- }));
28186
-
28187
- tileset.readyPromise.then(function(tileset) {
28188
- // Set the camera to view the newly added tileset
28189
- viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
28190
- });
28181
+ * url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
28182
+ * }));
28183
+ *
28184
+ * tileset.readyPromise.then(function(tileset) {
28185
+ * // Set the camera to view the newly added tileset
28186
+ * viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
28187
+ * });
28191
28188
  */
28192
28189
  readonly boundingSphere: BoundingSphere;
28193
28190
  /**
28194
28191
  * A 4x4 transformation matrix that transforms the entire tileset.
28195
28192
  * @example
28196
28193
  * // Adjust a tileset's height from the globe's surface.
28197
- const heightOffset = 20.0;
28198
- const boundingSphere = tileset.boundingSphere;
28199
- const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
28200
- const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
28201
- const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
28202
- const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
28203
- tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
28194
+ * const heightOffset = 20.0;
28195
+ * const boundingSphere = tileset.boundingSphere;
28196
+ * const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
28197
+ * const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
28198
+ * const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
28199
+ * const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
28200
+ * tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
28204
28201
  */
28205
28202
  modelMatrix: Matrix4;
28206
28203
  /**
@@ -28209,28 +28206,28 @@ export class Cesium3DTileset {
28209
28206
  readonly timeSinceLoad: number;
28210
28207
  /**
28211
28208
  * The total amount of GPU memory in bytes used by the tileset. This value is estimated from
28212
- geometry, texture, and batch table textures of loaded tiles. For point clouds, this value also
28213
- includes per-point metadata.
28209
+ * geometry, texture, and batch table textures of loaded tiles. For point clouds, this value also
28210
+ * includes per-point metadata.
28214
28211
  */
28215
28212
  readonly totalMemoryUsageInBytes: number;
28216
28213
  /**
28217
28214
  * Determines whether terrain, 3D Tiles or both will be classified by this tileset.
28218
- <p>
28219
- This option is only applied to tilesets containing batched 3D models, geometry data, or vector data. Even when undefined, vector data and geometry data
28220
- must render as classifications and will default to rendering on both terrain and other 3D Tiles tilesets.
28221
- </p>
28222
- <p>
28223
- When enabled for batched 3D model tilesets, there are a few requirements/limitations on the glTF:
28224
- <ul>
28225
- <li>POSITION and _BATCHID semantics are required.</li>
28226
- <li>All indices with the same batch id must occupy contiguous sections of the index buffer.</li>
28227
- <li>All shaders and techniques are ignored. The generated shader simply multiplies the position by the model-view-projection matrix.</li>
28228
- <li>The only supported extensions are CESIUM_RTC and WEB3D_quantized_attributes.</li>
28229
- <li>Only one node is supported.</li>
28230
- <li>Only one mesh per node is supported.</li>
28231
- <li>Only one primitive per mesh is supported.</li>
28232
- </ul>
28233
- </p>
28215
+ * <p>
28216
+ * This option is only applied to tilesets containing batched 3D models, geometry data, or vector data. Even when undefined, vector data and geometry data
28217
+ * must render as classifications and will default to rendering on both terrain and other 3D Tiles tilesets.
28218
+ * </p>
28219
+ * <p>
28220
+ * When enabled for batched 3D model tilesets, there are a few requirements/limitations on the glTF:
28221
+ * <ul>
28222
+ * <li>POSITION and _BATCHID semantics are required.</li>
28223
+ * <li>All indices with the same batch id must occupy contiguous sections of the index buffer.</li>
28224
+ * <li>All shaders and techniques are ignored. The generated shader simply multiplies the position by the model-view-projection matrix.</li>
28225
+ * <li>The only supported extensions are CESIUM_RTC and WEB3D_quantized_attributes.</li>
28226
+ * <li>Only one node is supported.</li>
28227
+ * <li>Only one mesh per node is supported.</li>
28228
+ * <li>Only one primitive per mesh is supported.</li>
28229
+ * </ul>
28230
+ * </p>
28234
28231
  */
28235
28232
  readonly classificationType: ClassificationType;
28236
28233
  /**
@@ -28239,58 +28236,112 @@ export class Cesium3DTileset {
28239
28236
  readonly ellipsoid: Ellipsoid;
28240
28237
  /**
28241
28238
  * Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
28242
- Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and {@link Cesium3DTileset#foveatedInterpolationCallback} and {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation}.
28243
- Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect.
28239
+ * Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and {@link Cesium3DTileset#foveatedInterpolationCallback} and {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation}.
28240
+ * Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect.
28244
28241
  */
28245
28242
  foveatedConeSize: number;
28246
28243
  /**
28247
28244
  * Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
28248
- The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
28245
+ * The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
28249
28246
  */
28250
28247
  foveatedMinimumScreenSpaceErrorRelaxation: number;
28251
28248
  /**
28252
28249
  * Returns the <code>extras</code> property at the top-level of the tileset JSON, which contains application specific metadata.
28253
- Returns <code>undefined</code> if <code>extras</code> does not exist.
28250
+ * Returns <code>undefined</code> if <code>extras</code> does not exist.
28254
28251
  */
28255
28252
  readonly extras: any;
28253
+ /**
28254
+ * The properties for managing image-based lighting on this tileset.
28255
+ */
28256
+ imageBasedLighting: ImageBasedLighting;
28256
28257
  /**
28257
28258
  * Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
28258
- diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
28259
+ * diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
28259
28260
  */
28260
28261
  imageBasedLightingFactor: Cartesian2;
28262
+ /**
28263
+ * The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
28264
+ * This is used when {@link Cesium3DTileset#specularEnvironmentMaps} and {@link Cesium3DTileset#sphericalHarmonicCoefficients} are not defined.
28265
+ */
28266
+ luminanceAtZenith: number;
28267
+ /**
28268
+ * The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
28269
+ * computed from the atmosphere color is used.
28270
+ * <p>
28271
+ * There are nine <code>Cartesian3</code> coefficients.
28272
+ * The order of the coefficients is: L<sub>0,0</sub>, L<sub>1,-1</sub>, L<sub>1,0</sub>, L<sub>1,1</sub>, L<sub>2,-2</sub>, L<sub>2,-1</sub>, L<sub>2,0</sub>, L<sub>2,1</sub>, L<sub>2,2</sub>
28273
+ * </p>
28274
+ *
28275
+ * These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
28276
+ * {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
28277
+ * supplied to {@link Cesium3DTileset#specularEnvironmentMaps}.
28278
+ */
28279
+ sphericalHarmonicCoefficients: Cartesian3[];
28280
+ /**
28281
+ * A URL to a KTX file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
28282
+ */
28283
+ specularEnvironmentMaps: string;
28261
28284
  /**
28262
28285
  * Indicates that only the tileset's vector tiles should be used for classification.
28263
28286
  */
28264
28287
  vectorClassificationOnly: boolean;
28265
28288
  /**
28266
28289
  * Whether vector tiles should keep decoded positions in memory.
28267
- This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
28290
+ * This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
28268
28291
  */
28269
28292
  vectorKeepDecodedPositions: boolean;
28270
28293
  /**
28271
28294
  * Determines whether the credits of the tileset will be displayed on the screen
28272
28295
  */
28273
28296
  showCreditsOnScreen: boolean;
28297
+ /**
28298
+ * Label of the feature ID set to use for picking and styling.
28299
+ * <p>
28300
+ * For EXT_mesh_features, this is the feature ID's label property, or
28301
+ * "featureId_N" (where N is the index in the featureIds array) when not
28302
+ * specified. EXT_feature_metadata did not have a label field, so such
28303
+ * feature ID sets are always labeled "featureId_N" where N is the index in
28304
+ * the list of all feature Ids, where feature ID attributes are listed before
28305
+ * feature ID textures.
28306
+ * </p>
28307
+ * <p>
28308
+ * If featureIdLabel is set to an integer N, it is converted to
28309
+ * the string "featureId_N" automatically. If both per-primitive and
28310
+ * per-instance feature IDs are present, the instance feature IDs take
28311
+ * priority.
28312
+ * </p>
28313
+ */
28314
+ featureIdLabel: string;
28315
+ /**
28316
+ * Label of the instance feature ID set used for picking and styling.
28317
+ * <p>
28318
+ * If instanceFeatureIdLabel is set to an integer N, it is converted to
28319
+ * the string "instanceFeatureId_N" automatically.
28320
+ * If both per-primitive and per-instance feature IDs are present, the
28321
+ * instance feature IDs take priority.
28322
+ * </p>
28323
+ */
28324
+ instanceFeatureIdLabel: string;
28274
28325
  /**
28275
28326
  * Provides a hook to override the method used to request the tileset json
28276
- useful when fetching tilesets from remote servers
28327
+ * useful when fetching tilesets from remote servers
28277
28328
  * @param tilesetUrl - The url of the json file to be fetched
28278
28329
  * @returns A promise that resolves with the fetched json data
28279
28330
  */
28280
28331
  static loadJson(tilesetUrl: Resource | string): Promise<object>;
28281
28332
  /**
28282
28333
  * Marks the tileset's {@link Cesium3DTileset#style} as dirty, which forces all
28283
- features to re-evaluate the style in the next frame each is visible.
28334
+ * features to re-evaluate the style in the next frame each is visible.
28284
28335
  */
28285
28336
  makeStyleDirty(): void;
28286
28337
  /**
28287
28338
  * Unloads all tiles that weren't selected the previous frame. This can be used to
28288
- explicitly manage the tile cache and reduce the total number of tiles loaded below
28289
- {@link Cesium3DTileset#maximumMemoryUsage}.
28290
- <p>
28291
- Tile unloads occur at the next frame to keep all the WebGL delete calls
28292
- within the render loop.
28293
- </p>
28339
+ * explicitly manage the tile cache and reduce the total number of tiles loaded below
28340
+ * {@link Cesium3DTileset#maximumMemoryUsage}.
28341
+ * <p>
28342
+ * Tile unloads occur at the next frame to keep all the WebGL delete calls
28343
+ * within the render loop.
28344
+ * </p>
28294
28345
  */
28295
28346
  trimLoadedTiles(): void;
28296
28347
  /**
@@ -28301,19 +28352,19 @@ export class Cesium3DTileset {
28301
28352
  hasExtension(extensionName: string): boolean;
28302
28353
  /**
28303
28354
  * Returns true if this object was destroyed; otherwise, false.
28304
- <br /><br />
28305
- If this object was destroyed, it should not be used; calling any function other than
28306
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
28355
+ * <br /><br />
28356
+ * If this object was destroyed, it should not be used; calling any function other than
28357
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
28307
28358
  * @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
28308
28359
  */
28309
28360
  isDestroyed(): boolean;
28310
28361
  /**
28311
28362
  * Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
28312
- release of WebGL resources, instead of relying on the garbage collector to destroy this object.
28313
- <br /><br />
28314
- Once an object is destroyed, it should not be used; calling any function other than
28315
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
28316
- assign the return value (<code>undefined</code>) to the object as done in the example.
28363
+ * release of WebGL resources, instead of relying on the garbage collector to destroy this object.
28364
+ * <br /><br />
28365
+ * Once an object is destroyed, it should not be used; calling any function other than
28366
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
28367
+ * assign the return value (<code>undefined</code>) to the object as done in the example.
28317
28368
  * @example
28318
28369
  * tileset = tileset && tileset.destroy();
28319
28370
  */
@@ -28323,7 +28374,7 @@ export class Cesium3DTileset {
28323
28374
  export namespace Cesium3DTileset {
28324
28375
  /**
28325
28376
  * Optimization option. Used as a callback when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control how much to raise the screen space error for tiles outside the foveated cone,
28326
- interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
28377
+ * interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
28327
28378
  * @param p - The start value to interpolate.
28328
28379
  * @param q - The end value to interpolate.
28329
28380
  * @param time - The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
@@ -30565,6 +30616,11 @@ export class Fog {
30565
30616
  * <code>true</code> if fog is enabled, <code>false</code> otherwise.
30566
30617
  */
30567
30618
  enabled: boolean;
30619
+ /**
30620
+ * <code>true</code> if fog is renderable in shaders, <code>false</code> otherwise.
30621
+ This allows to benefits from optimized tile loading strategy based on fog density without the actual visual rendering.
30622
+ */
30623
+ renderable: boolean;
30568
30624
  /**
30569
30625
  * A scalar that determines the density of the fog. Terrain that is in full fog are culled.
30570
30626
  The density of the fog increases as this number approaches 1.0 and becomes less dense as it approaches zero.
@@ -32170,6 +32226,55 @@ export enum HorizontalOrigin {
32170
32226
  RIGHT = -1
32171
32227
  }
32172
32228
 
32229
+ /**
32230
+ * Properties for managing image-based lighting on tilesets and models.
32231
+ Also manages the necessary resources and textures.
32232
+ <p>
32233
+ If specular environment maps are used, {@link ImageBasedLighting#destroy} must be called
32234
+ when the image-based lighting is no longer needed to clean up GPU resources properly.
32235
+ If a model or tileset creates an instance of ImageBasedLighting, it will handle this.
32236
+ Otherwise, the application is responsible for calling destroy().
32237
+ </p>
32238
+ * @param [options.imageBasedLightingFactor = Cartesian2(1.0, 1.0)] - Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
32239
+ * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
32240
+ * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
32241
+ * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
32242
+ */
32243
+ export class ImageBasedLighting {
32244
+ constructor();
32245
+ /**
32246
+ * Cesium adds lighting from the earth, sky, atmosphere, and star skybox.
32247
+ This cartesian is used to scale the final diffuse and specular lighting
32248
+ contribution from those sources to the final color. A value of 0.0 will
32249
+ disable those light sources.
32250
+ */
32251
+ imageBasedLightingFactor: Cartesian2;
32252
+ /**
32253
+ * The sun's luminance at the zenith in kilo candela per meter squared
32254
+ to use for this model's procedural environment map. This is used when
32255
+ {@link ImageBasedLighting#specularEnvironmentMaps} and {@link ImageBasedLighting#sphericalHarmonicCoefficients}
32256
+ are not defined.
32257
+ */
32258
+ luminanceAtZenith: number;
32259
+ /**
32260
+ * The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
32261
+ computed from the atmosphere color is used.
32262
+ <p>
32263
+ There are nine <code>Cartesian3</code> coefficients.
32264
+ The order of the coefficients is: L<sub>0,0</sub>, L<sub>1,-1</sub>, L<sub>1,0</sub>, L<sub>1,1</sub>, L<sub>2,-2</sub>, L<sub>2,-1</sub>, L<sub>2,0</sub>, L<sub>2,1</sub>, L<sub>2,2</sub>
32265
+ </p>
32266
+
32267
+ These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
32268
+ {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
32269
+ supplied to {@link Model#specularEnvironmentMaps}.
32270
+ */
32271
+ sphericalHarmonicCoefficients: Cartesian3[];
32272
+ /**
32273
+ * A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
32274
+ */
32275
+ specularEnvironmentMaps: string;
32276
+ }
32277
+
32173
32278
  /**
32174
32279
  * An imagery layer that displays tiled image data from a single imagery provider
32175
32280
  * on a {@link Globe}.
@@ -32233,7 +32338,7 @@ export enum HorizontalOrigin {
32233
32338
  * imagery tile for which the gamma is required, and it is expected to return
32234
32339
  * the gamma value to use for the tile. The function is executed for every
32235
32340
  * frame and for every tile, so it must be fast.
32236
- * @param [options.splitDirection = ImagerySplitDirection.NONE] - The {@link ImagerySplitDirection} split to apply to this layer.
32341
+ * @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this layer.
32237
32342
  * @param [options.minificationFilter = TextureMinificationFilter.LINEAR] - The
32238
32343
  * texture minification filter to apply to this layer. Possible values
32239
32344
  * are <code>TextureMinificationFilter.LINEAR</code> and
@@ -32266,7 +32371,7 @@ export class ImageryLayer {
32266
32371
  hue?: number | ((...params: any[]) => any);
32267
32372
  saturation?: number | ((...params: any[]) => any);
32268
32373
  gamma?: number | ((...params: any[]) => any);
32269
- splitDirection?: ImagerySplitDirection | ((...params: any[]) => any);
32374
+ splitDirection?: SplitDirection | ((...params: any[]) => any);
32270
32375
  minificationFilter?: TextureMinificationFilter;
32271
32376
  magnificationFilter?: TextureMagnificationFilter;
32272
32377
  show?: boolean;
@@ -32316,9 +32421,9 @@ export class ImageryLayer {
32316
32421
  */
32317
32422
  gamma: number;
32318
32423
  /**
32319
- * The {@link ImagerySplitDirection} to apply to this layer.
32424
+ * The {@link SplitDirection} to apply to this layer.
32320
32425
  */
32321
- splitDirection: ImagerySplitDirection;
32426
+ splitDirection: SplitDirection;
32322
32427
  /**
32323
32428
  * The {@link TextureMinificationFilter} to apply to this layer.
32324
32429
  * Possible values are {@link TextureMinificationFilter.LINEAR} (the default)
@@ -32391,7 +32496,7 @@ export class ImageryLayer {
32391
32496
  * This value is used as the default split for the imagery layer if one is not provided during construction
32392
32497
  * or by the imagery provider.
32393
32498
  */
32394
- static DEFAULT_SPLIT: ImagerySplitDirection;
32499
+ static DEFAULT_SPLIT: SplitDirection;
32395
32500
  /**
32396
32501
  * This value is used as the default texture minification filter for the imagery layer if one is not provided
32397
32502
  * during construction or by the imagery provider.
@@ -32457,24 +32562,24 @@ export class ImageryLayerCollection {
32457
32562
  constructor();
32458
32563
  /**
32459
32564
  * An event that is raised when a layer is added to the collection. Event handlers are passed the layer that
32460
- was added and the index at which it was added.
32565
+ * was added and the index at which it was added.
32461
32566
  */
32462
32567
  layerAdded: Event;
32463
32568
  /**
32464
32569
  * An event that is raised when a layer is removed from the collection. Event handlers are passed the layer that
32465
- was removed and the index from which it was removed.
32570
+ * was removed and the index from which it was removed.
32466
32571
  */
32467
32572
  layerRemoved: Event;
32468
32573
  /**
32469
32574
  * An event that is raised when a layer changes position in the collection. Event handlers are passed the layer that
32470
- was moved, its new index after the move, and its old index prior to the move.
32575
+ * was moved, its new index after the move, and its old index prior to the move.
32471
32576
  */
32472
32577
  layerMoved: Event;
32473
32578
  /**
32474
32579
  * An event that is raised when a layer is shown or hidden by setting the
32475
- {@link ImageryLayer#show} property. Event handlers are passed a reference to this layer,
32476
- the index of the layer in the collection, and a flag that is true if the layer is now
32477
- shown or false if it is now hidden.
32580
+ * {@link ImageryLayer#show} property. Event handlers are passed a reference to this layer,
32581
+ * the index of the layer in the collection, and a flag that is true if the layer is now
32582
+ * shown or false if it is now hidden.
32478
32583
  */
32479
32584
  layerShownOrHidden: Event;
32480
32585
  /**
@@ -32485,14 +32590,14 @@ export class ImageryLayerCollection {
32485
32590
  * Adds a layer to the collection.
32486
32591
  * @param layer - the layer to add.
32487
32592
  * @param [index] - the index to add the layer at. If omitted, the layer will
32488
- be added on top of all existing layers.
32593
+ * be added on top of all existing layers.
32489
32594
  */
32490
32595
  add(layer: ImageryLayer, index?: number): void;
32491
32596
  /**
32492
32597
  * Creates a new layer using the given ImageryProvider and adds it to the collection.
32493
32598
  * @param imageryProvider - the imagery provider to create a new layer for.
32494
32599
  * @param [index] - the index to add the layer at. If omitted, the layer will
32495
- added on top of all existing layers.
32600
+ * added on top of all existing layers.
32496
32601
  * @returns The newly created layer.
32497
32602
  */
32498
32603
  addImageryProvider(imageryProvider: ImageryProvider, index?: number): ImageryLayer;
@@ -32501,7 +32606,7 @@ export class ImageryLayerCollection {
32501
32606
  * @param layer - The layer to remove.
32502
32607
  * @param [destroy = true] - whether to destroy the layers in addition to removing them.
32503
32608
  * @returns true if the layer was in the collection and was removed,
32504
- false if the layer was not in the collection.
32609
+ * false if the layer was not in the collection.
32505
32610
  */
32506
32611
  remove(layer: ImageryLayer, destroy?: boolean): boolean;
32507
32612
  /**
@@ -32549,57 +32654,57 @@ export class ImageryLayerCollection {
32549
32654
  lowerToBottom(layer: ImageryLayer): void;
32550
32655
  /**
32551
32656
  * Determines the imagery layers that are intersected by a pick ray. To compute a pick ray from a
32552
- location on the screen, use {@link Camera.getPickRay}.
32657
+ * location on the screen, use {@link Camera.getPickRay}.
32553
32658
  * @param ray - The ray to test for intersection.
32554
32659
  * @param scene - The scene.
32555
32660
  * @returns An array that includes all of
32556
- the layers that are intersected by a given pick ray. Undefined if
32557
- no layers are selected.
32661
+ * the layers that are intersected by a given pick ray. Undefined if
32662
+ * no layers are selected.
32558
32663
  */
32559
32664
  pickImageryLayers(ray: Ray, scene: Scene): ImageryLayer[] | undefined;
32560
32665
  /**
32561
32666
  * Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery
32562
- layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
32563
- by the pick ray. To compute a pick ray from a location on the screen, use {@link Camera.getPickRay}.
32667
+ * layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
32668
+ * by the pick ray. To compute a pick ray from a location on the screen, use {@link Camera.getPickRay}.
32564
32669
  * @example
32565
32670
  * const pickRay = viewer.camera.getPickRay(windowPosition);
32566
- const featuresPromise = viewer.imageryLayers.pickImageryLayerFeatures(pickRay, viewer.scene);
32567
- if (!Cesium.defined(featuresPromise)) {
32568
- console.log('No features picked.');
32569
- } else {
32570
- Cesium.when(featuresPromise, function(features) {
32571
- // This function is called asynchronously when the list if picked features is available.
32572
- console.log('Number of features: ' + features.length);
32573
- if (features.length > 0) {
32574
- console.log('First feature name: ' + features[0].name);
32575
- }
32576
- });
32577
- }
32671
+ * const featuresPromise = viewer.imageryLayers.pickImageryLayerFeatures(pickRay, viewer.scene);
32672
+ * if (!Cesium.defined(featuresPromise)) {
32673
+ * console.log('No features picked.');
32674
+ * } else {
32675
+ * Promise.resolve(featuresPromise).then(function(features) {
32676
+ * // This function is called asynchronously when the list if picked features is available.
32677
+ * console.log('Number of features: ' + features.length);
32678
+ * if (features.length > 0) {
32679
+ * console.log('First feature name: ' + features[0].name);
32680
+ * }
32681
+ * });
32682
+ * }
32578
32683
  * @param ray - The ray to test for intersection.
32579
32684
  * @param scene - The scene.
32580
32685
  * @returns A promise that resolves to an array of features intersected by the pick ray.
32581
- If it can be quickly determined that no features are intersected (for example,
32582
- because no active imagery providers support {@link ImageryProvider#pickFeatures}
32583
- or because the pick ray does not intersect the surface), this function will
32584
- return undefined.
32686
+ * If it can be quickly determined that no features are intersected (for example,
32687
+ * because no active imagery providers support {@link ImageryProvider#pickFeatures}
32688
+ * or because the pick ray does not intersect the surface), this function will
32689
+ * return undefined.
32585
32690
  */
32586
32691
  pickImageryLayerFeatures(ray: Ray, scene: Scene): Promise<ImageryLayerFeatureInfo[]> | undefined;
32587
32692
  /**
32588
32693
  * Returns true if this object was destroyed; otherwise, false.
32589
- <br /><br />
32590
- If this object was destroyed, it should not be used; calling any function other than
32591
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
32694
+ * <br /><br />
32695
+ * If this object was destroyed, it should not be used; calling any function other than
32696
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
32592
32697
  * @returns true if this object was destroyed; otherwise, false.
32593
32698
  */
32594
32699
  isDestroyed(): boolean;
32595
32700
  /**
32596
32701
  * Destroys the WebGL resources held by all layers in this collection. Explicitly destroying this
32597
- object allows for deterministic release of WebGL resources, instead of relying on the garbage
32598
- collector.
32599
- <br /><br />
32600
- Once this object is destroyed, it should not be used; calling any function other than
32601
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
32602
- assign the return value (<code>undefined</code>) to the object as done in the example.
32702
+ * object allows for deterministic release of WebGL resources, instead of relying on the garbage
32703
+ * collector.
32704
+ * <br /><br />
32705
+ * Once this object is destroyed, it should not be used; calling any function other than
32706
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
32707
+ * assign the return value (<code>undefined</code>) to the object as done in the example.
32603
32708
  * @example
32604
32709
  * layerCollection = layerCollection && layerCollection.destroy();
32605
32710
  */
@@ -32824,21 +32929,9 @@ export class ImageryProvider {
32824
32929
  }
32825
32930
 
32826
32931
  /**
32827
- * The direction to display an ImageryLayer relative to the {@link Scene#imagerySplitPosition}.
32932
+ * This enumeration is deprecated. Use {@link SplitPosition} instead.
32828
32933
  */
32829
32934
  export enum ImagerySplitDirection {
32830
- /**
32831
- * Display the ImageryLayer to the left of the {@link Scene#imagerySplitPosition}.
32832
- */
32833
- LEFT = -1,
32834
- /**
32835
- * Always display the ImageryLayer.
32836
- */
32837
- NONE = 0,
32838
- /**
32839
- * Display the ImageryLayer to the right of the {@link Scene#imagerySplitPosition}.
32840
- */
32841
- RIGHT = 1
32842
32935
  }
32843
32936
 
32844
32937
  export namespace IonImageryProvider {
@@ -34480,56 +34573,56 @@ export namespace MaterialAppearance {
34480
34573
 
34481
34574
  /**
34482
34575
  * A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
34483
- <p>
34484
- Cesium includes support for geometry and materials, glTF animations, and glTF skinning.
34485
- In addition, individual glTF nodes are pickable with {@link Scene#pick} and animatable
34486
- with {@link Model#getNode}. glTF cameras and lights are not currently supported.
34487
- </p>
34488
- <p>
34489
- An external glTF asset is created with {@link Model.fromGltf}. glTF JSON can also be
34490
- created at runtime and passed to this constructor function. In either case, the
34491
- {@link Model#readyPromise} is resolved when the model is ready to render, i.e.,
34492
- when the external binary, image, and shader files are downloaded and the WebGL
34493
- resources are created.
34494
- </p>
34495
- <p>
34496
- Cesium supports glTF assets with the following extensions:
34497
- <ul>
34498
- <li>
34499
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
34500
- </li><li>
34501
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
34502
- </li><li>
34503
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
34504
- </li><li>
34505
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
34506
- </li><li>
34507
- {@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
34508
- </li><li>
34509
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
34510
- </li><li>
34511
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
34512
- </li><li>
34513
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
34514
- </li><li>
34515
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
34516
- </li><li>
34517
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
34518
- </li><li>
34519
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
34520
- </li>
34521
- </ul>
34522
- </p>
34523
- <p>
34524
- Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
34525
- for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
34526
- and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
34527
- </p>
34528
- <p>
34529
- For high-precision rendering, Cesium supports the {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC} extension, which introduces the
34530
- CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
34531
- relative to a local origin.
34532
- </p>
34576
+ * <p>
34577
+ * Cesium includes support for geometry and materials, glTF animations, and glTF skinning.
34578
+ * In addition, individual glTF nodes are pickable with {@link Scene#pick} and animatable
34579
+ * with {@link Model#getNode}. glTF cameras and lights are not currently supported.
34580
+ * </p>
34581
+ * <p>
34582
+ * An external glTF asset is created with {@link Model.fromGltf}. glTF JSON can also be
34583
+ * created at runtime and passed to this constructor function. In either case, the
34584
+ * {@link Model#readyPromise} is resolved when the model is ready to render, i.e.,
34585
+ * when the external binary, image, and shader files are downloaded and the WebGL
34586
+ * resources are created.
34587
+ * </p>
34588
+ * <p>
34589
+ * Cesium supports glTF assets with the following extensions:
34590
+ * <ul>
34591
+ * <li>
34592
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
34593
+ * </li><li>
34594
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
34595
+ * </li><li>
34596
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
34597
+ * </li><li>
34598
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
34599
+ * </li><li>
34600
+ * {@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
34601
+ * </li><li>
34602
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
34603
+ * </li><li>
34604
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
34605
+ * </li><li>
34606
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
34607
+ * </li><li>
34608
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
34609
+ * </li><li>
34610
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
34611
+ * </li><li>
34612
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
34613
+ * </li>
34614
+ * </ul>
34615
+ * </p>
34616
+ * <p>
34617
+ * Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
34618
+ * for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
34619
+ * and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
34620
+ * </p>
34621
+ * <p>
34622
+ * For high-precision rendering, Cesium supports the {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC} extension, which introduces the
34623
+ * CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
34624
+ * relative to a local origin.
34625
+ * </p>
34533
34626
  * @param [options] - Object with the following properties:
34534
34627
  * @param [options.gltf] - A glTF JSON object, or a binary glTF buffer.
34535
34628
  * @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
@@ -34556,15 +34649,17 @@ relative to a local origin.
34556
34649
  * @param [options.silhouetteSize = 0.0] - The size of the silhouette in pixels.
34557
34650
  * @param [options.clippingPlanes] - The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
34558
34651
  * @param [options.dequantizeInShader = true] - Determines if a {@link https://github.com/google/draco|Draco} encoded model is dequantized on the GPU. This decreases total memory usage for encoded models.
34559
- * @param [options.imageBasedLightingFactor = Cartesian2(1.0, 1.0)] - Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
34560
34652
  * @param [options.lightColor] - The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
34561
- * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
34562
- * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
34563
- * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
34653
+ * @param [options.imageBasedLighting] - The properties for managing image-based lighting on this model.
34654
+ * @param [options.imageBasedLightingFactor = new Cartesian2(1.0, 1.0)] - Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
34655
+ * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
34656
+ * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
34657
+ * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
34564
34658
  * @param [options.credit] - A credit for the data source, which is displayed on the canvas.
34565
34659
  * @param [options.showCreditsOnScreen = false] - Whether to display the credits of this model on screen.
34566
34660
  * @param [options.backFaceCulling = true] - Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if {@link Model#color} is translucent or {@link Model#silhouetteSize} is greater than 0.0.
34567
34661
  * @param [options.showOutline = true] - Whether to display the outline for models using the {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension. When true, outlines are displayed. When false, outlines are not displayed.
34662
+ * @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this model.
34568
34663
  */
34569
34664
  export class Model {
34570
34665
  constructor(options?: {
@@ -34593,8 +34688,9 @@ export class Model {
34593
34688
  silhouetteSize?: number;
34594
34689
  clippingPlanes?: ClippingPlaneCollection;
34595
34690
  dequantizeInShader?: boolean;
34596
- imageBasedLightingFactor?: Cartesian2;
34597
34691
  lightColor?: Cartesian3;
34692
+ imageBasedLighting?: ImageBasedLighting;
34693
+ imageBasedLightingFactor?: Cartesian2;
34598
34694
  luminanceAtZenith?: number;
34599
34695
  sphericalHarmonicCoefficients?: Cartesian3[];
34600
34696
  specularEnvironmentMaps?: string;
@@ -34602,6 +34698,7 @@ export class Model {
34602
34698
  showCreditsOnScreen?: boolean;
34603
34699
  backFaceCulling?: boolean;
34604
34700
  showOutline?: boolean;
34701
+ splitDirection?: SplitDirection;
34605
34702
  });
34606
34703
  /**
34607
34704
  * Determines if the model primitive will be shown.
@@ -34617,30 +34714,30 @@ export class Model {
34617
34714
  silhouetteSize: number;
34618
34715
  /**
34619
34716
  * The 4x4 transformation matrix that transforms the model from model to world coordinates.
34620
- When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
34621
- Local reference frames can be used by providing a different transformation matrix, like that returned
34622
- by {@link Transforms.eastNorthUpToFixedFrame}.
34717
+ * When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
34718
+ * Local reference frames can be used by providing a different transformation matrix, like that returned
34719
+ * by {@link Transforms.eastNorthUpToFixedFrame}.
34623
34720
  * @example
34624
34721
  * const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
34625
- m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
34722
+ * m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
34626
34723
  */
34627
34724
  modelMatrix: Matrix4;
34628
34725
  /**
34629
34726
  * A uniform scale applied to this model before the {@link Model#modelMatrix}.
34630
- Values greater than <code>1.0</code> increase the size of the model; values
34631
- less than <code>1.0</code> decrease.
34727
+ * Values greater than <code>1.0</code> increase the size of the model; values
34728
+ * less than <code>1.0</code> decrease.
34632
34729
  */
34633
34730
  scale: number;
34634
34731
  /**
34635
34732
  * The approximate minimum pixel size of the model regardless of zoom.
34636
- This can be used to ensure that a model is visible even when the viewer
34637
- zooms out. When <code>0.0</code>, no minimum size is enforced.
34733
+ * This can be used to ensure that a model is visible even when the viewer
34734
+ * zooms out. When <code>0.0</code>, no minimum size is enforced.
34638
34735
  */
34639
34736
  minimumPixelSize: number;
34640
34737
  /**
34641
34738
  * The maximum scale size for a model. This can be used to give
34642
- an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
34643
- is never an unreasonable scale.
34739
+ * an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
34740
+ * is never an unreasonable scale.
34644
34741
  */
34645
34742
  maximumScale: number;
34646
34743
  /**
@@ -34673,85 +34770,89 @@ export class Model {
34673
34770
  colorBlendMode: ColorBlendMode;
34674
34771
  /**
34675
34772
  * Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>.
34676
- A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with
34677
- any value in-between resulting in a mix of the two.
34773
+ * A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with
34774
+ * any value in-between resulting in a mix of the two.
34678
34775
  */
34679
34776
  colorBlendAmount: number;
34680
34777
  /**
34681
34778
  * Whether to cull back-facing geometry. When true, back face culling is
34682
- determined by the material's doubleSided property; when false, back face
34683
- culling is disabled. Back faces are not culled if {@link Model#color} is
34684
- translucent or {@link Model#silhouetteSize} is greater than 0.0.
34779
+ * determined by the material's doubleSided property; when false, back face
34780
+ * culling is disabled. Back faces are not culled if {@link Model#color} is
34781
+ * translucent or {@link Model#silhouetteSize} is greater than 0.0.
34685
34782
  */
34686
34783
  backFaceCulling: boolean;
34687
34784
  /**
34688
34785
  * Whether to display the outline for models using the
34689
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
34690
- When true, outlines are displayed. When false, outlines are not displayed.
34786
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
34787
+ * When true, outlines are displayed. When false, outlines are not displayed.
34691
34788
  */
34692
34789
  readonly showOutline: boolean;
34790
+ /**
34791
+ * The {@link SplitDirection} to apply to this model.
34792
+ */
34793
+ splitDirection: SplitDirection;
34693
34794
  /**
34694
34795
  * This property is for debugging only; it is not for production use nor is it optimized.
34695
- <p>
34696
- Draws the bounding sphere for each draw command in the model. A glTF primitive corresponds
34697
- to one draw command. A glTF mesh has an array of primitives, often of length one.
34698
- </p>
34796
+ * <p>
34797
+ * Draws the bounding sphere for each draw command in the model. A glTF primitive corresponds
34798
+ * to one draw command. A glTF mesh has an array of primitives, often of length one.
34799
+ * </p>
34699
34800
  */
34700
34801
  debugShowBoundingVolume: boolean;
34701
34802
  /**
34702
34803
  * This property is for debugging only; it is not for production use nor is it optimized.
34703
- <p>
34704
- Draws the model in wireframe.
34705
- </p>
34804
+ * <p>
34805
+ * Draws the model in wireframe.
34806
+ * </p>
34706
34807
  */
34707
34808
  debugWireframe: boolean;
34708
34809
  /**
34709
34810
  * The object for the glTF JSON, including properties with default values omitted
34710
- from the JSON provided to this model.
34811
+ * from the JSON provided to this model.
34711
34812
  */
34712
34813
  readonly gltf: any;
34713
34814
  /**
34714
34815
  * The base path that paths in the glTF JSON are relative to. The base
34715
- path is the same path as the path containing the .gltf file
34716
- minus the .gltf file, when binary, image, and shader files are
34717
- in the same directory as the .gltf. When this is <code>''</code>,
34718
- the app's base path is used.
34816
+ * path is the same path as the path containing the .gltf file
34817
+ * minus the .gltf file, when binary, image, and shader files are
34818
+ * in the same directory as the .gltf. When this is <code>''</code>,
34819
+ * the app's base path is used.
34719
34820
  */
34720
34821
  readonly basePath: string;
34721
34822
  /**
34722
34823
  * The model's bounding sphere in its local coordinate system. This does not take into
34723
- account glTF animations and skins nor does it take into account {@link Model#minimumPixelSize}.
34824
+ * account glTF animations and skins nor does it take into account {@link Model#minimumPixelSize}.
34724
34825
  * @example
34725
34826
  * // Center in WGS84 coordinates
34726
- const center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
34827
+ * const center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
34727
34828
  */
34728
34829
  readonly boundingSphere: BoundingSphere;
34729
34830
  /**
34730
34831
  * When <code>true</code>, this model is ready to render, i.e., the external binary, image,
34731
- and shader files were downloaded and the WebGL resources were created. This is set to
34732
- <code>true</code> right before {@link Model#readyPromise} is resolved.
34832
+ * and shader files were downloaded and the WebGL resources were created. This is set to
34833
+ * <code>true</code> right before {@link Model#readyPromise} is resolved.
34733
34834
  */
34734
34835
  readonly ready: boolean;
34735
34836
  /**
34736
34837
  * Gets the promise that will be resolved when this model is ready to render, i.e., when the external binary, image,
34737
- and shader files were downloaded and the WebGL resources were created.
34738
- <p>
34739
- This promise is resolved at the end of the frame before the first frame the model is rendered in.
34740
- </p>
34838
+ * and shader files were downloaded and the WebGL resources were created.
34839
+ * <p>
34840
+ * This promise is resolved at the end of the frame before the first frame the model is rendered in.
34841
+ * </p>
34741
34842
  * @example
34742
34843
  * // Play all animations at half-speed when the model is ready to render
34743
- Cesium.when(model.readyPromise).then(function(model) {
34744
- model.activeAnimations.addAll({
34745
- multiplier : 0.5
34746
- });
34747
- }).otherwise(function(error){
34748
- window.alert(error);
34749
- });
34844
+ * Promise.resolve(model.readyPromise).then(function(model) {
34845
+ * model.activeAnimations.addAll({
34846
+ * multiplier : 0.5
34847
+ * });
34848
+ * }).catch(function(error){
34849
+ * window.alert(error);
34850
+ * });
34750
34851
  */
34751
34852
  readonly readyPromise: Promise<Model>;
34752
34853
  /**
34753
34854
  * Determines if model WebGL resource creation will be spread out over several frames or
34754
- block until completion once all glTF files are loaded.
34855
+ * block until completion once all glTF files are loaded.
34755
34856
  */
34756
34857
  readonly asynchronous: boolean;
34757
34858
  /**
@@ -34774,35 +34875,39 @@ export class Model {
34774
34875
  * The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
34775
34876
  */
34776
34877
  clippingPlanes: ClippingPlaneCollection;
34777
- /**
34778
- * Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
34779
- diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
34780
- */
34781
- imageBasedLightingFactor: Cartesian2;
34782
34878
  /**
34783
34879
  * The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
34784
- <p>
34785
- For example, disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cesium.Cartesian2(0.0, 0.0)</code> will make the
34786
- model much darker. Here, increasing the intensity of the light source will make the model brighter.
34787
- </p>
34880
+ * <p>
34881
+ * For example, disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cesium.Cartesian2(0.0, 0.0)</code> will make the
34882
+ * model much darker. Here, increasing the intensity of the light source will make the model brighter.
34883
+ * </p>
34788
34884
  */
34789
34885
  lightColor: Cartesian3;
34886
+ /**
34887
+ * The properties for managing image-based lighting on this model.
34888
+ */
34889
+ imageBasedLighting: ImageBasedLighting;
34890
+ /**
34891
+ * Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
34892
+ * diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
34893
+ */
34894
+ imageBasedLightingFactor: Cartesian2;
34790
34895
  /**
34791
34896
  * The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
34792
- This is used when {@link Model#specularEnvironmentMaps} and {@link Model#sphericalHarmonicCoefficients} are not defined.
34897
+ * This is used when {@link Model#specularEnvironmentMaps} and {@link Model#sphericalHarmonicCoefficients} are not defined.
34793
34898
  */
34794
34899
  luminanceAtZenith: number;
34795
34900
  /**
34796
34901
  * The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
34797
- computed from the atmosphere color is used.
34798
- <p>
34799
- There are nine <code>Cartesian3</code> coefficients.
34800
- The order of the coefficients is: L<sub>00</sub>, L<sub>1-1</sub>, L<sub>10</sub>, L<sub>11</sub>, L<sub>2-2</sub>, L<sub>2-1</sub>, L<sub>20</sub>, L<sub>21</sub>, L<sub>22</sub>
34801
- </p>
34802
-
34803
- These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
34804
- {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
34805
- supplied to {@link Model#specularEnvironmentMaps}.
34902
+ * computed from the atmosphere color is used.
34903
+ * <p>
34904
+ * There are nine <code>Cartesian3</code> coefficients.
34905
+ * The order of the coefficients is: L<sub>0,0</sub>, L<sub>1,-1</sub>, L<sub>1,0</sub>, L<sub>1,1</sub>, L<sub>2,-2</sub>, L<sub>2,-1</sub>, L<sub>2,0</sub>, L<sub>2,1</sub>, L<sub>2,2</sub>
34906
+ * </p>
34907
+ *
34908
+ * These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
34909
+ * {@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
34910
+ * supplied to {@link Model#specularEnvironmentMaps}.
34806
34911
  */
34807
34912
  sphericalHarmonicCoefficients: Cartesian3[];
34808
34913
  /**
@@ -34825,71 +34930,71 @@ export class Model {
34825
34930
  static silhouetteSupported(scene: Scene): boolean;
34826
34931
  /**
34827
34932
  * <p>
34828
- Creates a model from a glTF asset. When the model is ready to render, i.e., when the external binary, image,
34829
- and shader files are downloaded and the WebGL resources are created, the {@link Model#readyPromise} is resolved.
34830
- </p>
34831
- <p>
34832
- The model can be a traditional glTF asset with a .gltf extension or a Binary glTF using the .glb extension.
34833
- </p>
34834
- <p>
34835
- Cesium supports glTF assets with the following extensions:
34836
- <ul>
34837
- <li>
34838
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
34839
- </li><li>
34840
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
34841
- </li><li>
34842
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
34843
- </li><li>
34844
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
34845
- </li><li>
34846
- {@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
34847
- </li><li>
34848
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
34849
- </li><li>
34850
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
34851
- </li><li>
34852
- {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
34853
- </li><li>
34854
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
34855
- </li><li>
34856
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
34857
- </li><li>
34858
- {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md|KHR_texture_basisu}
34859
- </li>
34860
- </ul>
34861
- </p>
34862
- <p>
34863
- For high-precision rendering, Cesium supports the {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC} extension, which introduces the
34864
- CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
34865
- relative to a local origin.
34866
- </p>
34933
+ * Creates a model from a glTF asset. When the model is ready to render, i.e., when the external binary, image,
34934
+ * and shader files are downloaded and the WebGL resources are created, the {@link Model#readyPromise} is resolved.
34935
+ * </p>
34936
+ * <p>
34937
+ * The model can be a traditional glTF asset with a .gltf extension or a Binary glTF using the .glb extension.
34938
+ * </p>
34939
+ * <p>
34940
+ * Cesium supports glTF assets with the following extensions:
34941
+ * <ul>
34942
+ * <li>
34943
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
34944
+ * </li><li>
34945
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
34946
+ * </li><li>
34947
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
34948
+ * </li><li>
34949
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
34950
+ * </li><li>
34951
+ * {@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
34952
+ * </li><li>
34953
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
34954
+ * </li><li>
34955
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
34956
+ * </li><li>
34957
+ * {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
34958
+ * </li><li>
34959
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
34960
+ * </li><li>
34961
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
34962
+ * </li><li>
34963
+ * {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md|KHR_texture_basisu}
34964
+ * </li>
34965
+ * </ul>
34966
+ * </p>
34967
+ * <p>
34968
+ * For high-precision rendering, Cesium supports the {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC} extension, which introduces the
34969
+ * CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
34970
+ * relative to a local origin.
34971
+ * </p>
34867
34972
  * @example
34868
34973
  * // Example 1. Create a model from a glTF asset
34869
- const model = scene.primitives.add(Cesium.Model.fromGltf({
34870
- url : './duck/duck.gltf'
34871
- }));
34974
+ * const model = scene.primitives.add(Cesium.Model.fromGltf({
34975
+ * url : './duck/duck.gltf'
34976
+ * }));
34872
34977
  * @example
34873
34978
  * // Example 2. Create model and provide all properties and events
34874
- const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
34875
- const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
34876
-
34877
- const model = scene.primitives.add(Cesium.Model.fromGltf({
34878
- url : './duck/duck.gltf',
34879
- show : true, // default
34880
- modelMatrix : modelMatrix,
34881
- scale : 2.0, // double size
34882
- minimumPixelSize : 128, // never smaller than 128 pixels
34883
- maximumScale: 20000, // never larger than 20000 * model size (overrides minimumPixelSize)
34884
- allowPicking : false, // not pickable
34885
- debugShowBoundingVolume : false, // default
34886
- debugWireframe : false
34887
- }));
34888
-
34889
- model.readyPromise.then(function(model) {
34890
- // Play all animations when the model is ready to render
34891
- model.activeAnimations.addAll();
34892
- });
34979
+ * const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
34980
+ * const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
34981
+ *
34982
+ * const model = scene.primitives.add(Cesium.Model.fromGltf({
34983
+ * url : './duck/duck.gltf',
34984
+ * show : true, // default
34985
+ * modelMatrix : modelMatrix,
34986
+ * scale : 2.0, // double size
34987
+ * minimumPixelSize : 128, // never smaller than 128 pixels
34988
+ * maximumScale: 20000, // never larger than 20000 * model size (overrides minimumPixelSize)
34989
+ * allowPicking : false, // not pickable
34990
+ * debugShowBoundingVolume : false, // default
34991
+ * debugWireframe : false
34992
+ * }));
34993
+ *
34994
+ * model.readyPromise.then(function(model) {
34995
+ * // Play all animations when the model is ready to render
34996
+ * model.activeAnimations.addAll();
34997
+ * });
34893
34998
  * @param options - Object with the following properties:
34894
34999
  * @param options.url - The url to the .gltf file.
34895
35000
  * @param [options.basePath] - The base path that paths in the glTF JSON are relative to.
@@ -34916,6 +35021,12 @@ export class Model {
34916
35021
  * @param [options.silhouetteSize = 0.0] - The size of the silhouette in pixels.
34917
35022
  * @param [options.clippingPlanes] - The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
34918
35023
  * @param [options.dequantizeInShader = true] - Determines if a {@link https://github.com/google/draco|Draco} encoded model is dequantized on the GPU. This decreases total memory usage for encoded models.
35024
+ * @param [options.lightColor] - The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
35025
+ * @param [options.imageBasedLighting] - The properties for managing image-based lighting for this tileset.
35026
+ * @param [options.imageBasedLightingFactor = new Cartesian2(1.0, 1.0)] - Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
35027
+ * @param [options.luminanceAtZenith = 0.2] - The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
35028
+ * @param [options.sphericalHarmonicCoefficients] - The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
35029
+ * @param [options.specularEnvironmentMaps] - A URL to a KTX2 file that contains a cube map of the specular lighting and the convoluted specular mipmaps. Deprecated in Cesium 1.92, will be removed in Cesium 1.94.
34919
35030
  * @param [options.credit] - A credit for the model, which is displayed on the canvas.
34920
35031
  * @param [options.showCreditsOnScreen = false] - Whether to display the credits of this model on screen.
34921
35032
  * @param [options.backFaceCulling = true] - Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if {@link Model#color} is translucent or {@link Model#silhouetteSize} is greater than 0.0.
@@ -34948,6 +35059,12 @@ export class Model {
34948
35059
  silhouetteSize?: number;
34949
35060
  clippingPlanes?: ClippingPlaneCollection;
34950
35061
  dequantizeInShader?: boolean;
35062
+ lightColor?: Cartesian3;
35063
+ imageBasedLighting?: ImageBasedLighting;
35064
+ imageBasedLightingFactor?: Cartesian2;
35065
+ luminanceAtZenith?: number;
35066
+ sphericalHarmonicCoefficients?: Cartesian3[];
35067
+ specularEnvironmentMaps?: string;
34951
35068
  credit?: Credit | string;
34952
35069
  showCreditsOnScreen?: boolean;
34953
35070
  backFaceCulling?: boolean;
@@ -34955,11 +35072,11 @@ export class Model {
34955
35072
  }): Model;
34956
35073
  /**
34957
35074
  * Returns the glTF node with the given <code>name</code> property. This is used to
34958
- modify a node's transform for animation outside of glTF animations.
35075
+ * modify a node's transform for animation outside of glTF animations.
34959
35076
  * @example
34960
35077
  * // Apply non-uniform scale to node LOD3sp
34961
- const node = model.getNode('LOD3sp');
34962
- node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
35078
+ * const node = model.getNode('LOD3sp');
35079
+ * node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
34963
35080
  * @param name - The glTF name of the node.
34964
35081
  * @returns The node or <code>undefined</code> if no node with <code>name</code> exists.
34965
35082
  */
@@ -34978,40 +35095,40 @@ export class Model {
34978
35095
  getMaterial(name: string): ModelMaterial;
34979
35096
  /**
34980
35097
  * Sets the current value of an articulation stage. After setting one or multiple stage values, call
34981
- Model.applyArticulations() to cause the node matrices to be recalculated.
35098
+ * Model.applyArticulations() to cause the node matrices to be recalculated.
34982
35099
  * @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
34983
35100
  * @param value - The numeric value of this stage of the articulation.
34984
35101
  */
34985
35102
  setArticulationStage(articulationStageKey: string, value: number): void;
34986
35103
  /**
34987
35104
  * Applies any modified articulation stages to the matrix of each node that participates
34988
- in any articulation. Note that this will overwrite any nodeTransformations on participating nodes.
35105
+ * in any articulation. Note that this will overwrite any nodeTransformations on participating nodes.
34989
35106
  */
34990
35107
  applyArticulations(): void;
34991
35108
  /**
34992
35109
  * Called when {@link Viewer} or {@link CesiumWidget} render the scene to
34993
- get the draw commands needed to render this primitive.
34994
- <p>
34995
- Do not call this function directly. This is documented just to
34996
- list the exceptions that may be propagated when the scene is rendered:
34997
- </p>
35110
+ * get the draw commands needed to render this primitive.
35111
+ * <p>
35112
+ * Do not call this function directly. This is documented just to
35113
+ * list the exceptions that may be propagated when the scene is rendered:
35114
+ * </p>
34998
35115
  */
34999
35116
  update(): void;
35000
35117
  /**
35001
35118
  * Returns true if this object was destroyed; otherwise, false.
35002
- <br /><br />
35003
- If this object was destroyed, it should not be used; calling any function other than
35004
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
35119
+ * <br /><br />
35120
+ * If this object was destroyed, it should not be used; calling any function other than
35121
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
35005
35122
  * @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
35006
35123
  */
35007
35124
  isDestroyed(): boolean;
35008
35125
  /**
35009
35126
  * Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
35010
- release of WebGL resources, instead of relying on the garbage collector to destroy this object.
35011
- <br /><br />
35012
- Once an object is destroyed, it should not be used; calling any function other than
35013
- <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
35014
- assign the return value (<code>undefined</code>) to the object as done in the example.
35127
+ * release of WebGL resources, instead of relying on the garbage collector to destroy this object.
35128
+ * <br /><br />
35129
+ * Once an object is destroyed, it should not be used; calling any function other than
35130
+ * <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
35131
+ * assign the return value (<code>undefined</code>) to the object as done in the example.
35015
35132
  * @example
35016
35133
  * model = model && model.destroy();
35017
35134
  */
@@ -35480,6 +35597,9 @@ the Model from your source data type.
35480
35597
  * @param options - Object with the following properties:
35481
35598
  * @param options.resource - The Resource to the 3D model.
35482
35599
  * @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms the model from model to world coordinates.
35600
+ * @param [options.scale = 1.0] - A uniform scale applied to this model.
35601
+ * @param [options.minimumPixelSize = 0.0] - The approximate minimum pixel size of the model regardless of zoom.
35602
+ * @param [options.maximumScale] - The maximum scale size of a model. An upper limit for minimumPixelSize.
35483
35603
  * @param [options.debugShowBoundingVolume = false] - For debugging only. Draws the bounding sphere for each draw command in the model.
35484
35604
  * @param [options.cull = true] - Whether or not to cull the model using frustum/horizon culling. If the model is part of a 3D Tiles tileset, this property will always be false, since the 3D Tiles culling system is used.
35485
35605
  * @param [options.opaquePass = Pass.OPAQUE] - The pass to use in the {@link DrawCommand} for the opaque portions of the model.
@@ -35490,17 +35610,24 @@ the Model from your source data type.
35490
35610
  * @param [options.color] - A color that blends with the model's rendered color.
35491
35611
  * @param [options.colorBlendMode = ColorBlendMode.HIGHLIGHT] - Defines how the color blends with the model.
35492
35612
  * @param [options.colorBlendAmount = 0.5] - Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
35493
- * @param [options.featureIdIndex = 0] - The index into the list of primitive feature IDs used for picking and styling. For EXT_feature_metadata, feature ID attributes are listed before feature ID textures. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35494
- * @param [options.instanceFeatureIdIndex = 0] - The index into the list of instance feature IDs used for picking and styling. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35613
+ * @param [options.featureIdLabel = "featureId_0"] - Label of the feature ID set to use for picking and styling. For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures. If featureIdLabel is an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35614
+ * @param [options.instanceFeatureIdLabel = "instanceFeatureId_0"] - Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35495
35615
  * @param [options.pointCloudShading] - Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
35616
+ * @param [options.clippingPlanes] - The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
35617
+ * @param [options.lightColor] - The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
35618
+ * @param [options.imageBasedLighting] - The properties for managing image-based lighting on this model.
35496
35619
  * @param [options.backFaceCulling = true] - Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if the model's color is translucent.
35497
35620
  * @param [options.shadows = ShadowMode.ENABLED] - Determines whether the model casts or receives shadows from light sources.
35498
35621
  * @param [options.showCreditsOnScreen = false] - Whether to display the credits of this model on screen.
35622
+ * @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this model.
35499
35623
  */
35500
35624
  export class ModelExperimental {
35501
35625
  constructor(options: {
35502
35626
  resource: Resource;
35503
35627
  modelMatrix?: Matrix4;
35628
+ scale?: number;
35629
+ minimumPixelSize?: number;
35630
+ maximumScale?: number;
35504
35631
  debugShowBoundingVolume?: boolean;
35505
35632
  cull?: boolean;
35506
35633
  opaquePass?: boolean;
@@ -35511,12 +35638,16 @@ export class ModelExperimental {
35511
35638
  color?: Color;
35512
35639
  colorBlendMode?: ColorBlendMode;
35513
35640
  colorBlendAmount?: number;
35514
- featureIdIndex?: number;
35515
- instanceFeatureIdIndex?: number;
35641
+ featureIdLabel?: string | number;
35642
+ instanceFeatureIdLabel?: string | number;
35516
35643
  pointCloudShading?: any;
35644
+ clippingPlanes?: ClippingPlaneCollection;
35645
+ lightColor?: Cartesian3;
35646
+ imageBasedLighting?: ImageBasedLighting;
35517
35647
  backFaceCulling?: boolean;
35518
35648
  shadows?: ShadowMode;
35519
35649
  showCreditsOnScreen?: boolean;
35650
+ splitDirection?: SplitDirection;
35520
35651
  });
35521
35652
  /**
35522
35653
  * When <code>true</code>, this model is ready to render, i.e., the external binary, image,
@@ -35571,22 +35702,86 @@ export class ModelExperimental {
35571
35702
  */
35572
35703
  show: boolean;
35573
35704
  /**
35574
- * The index into the list of primitive feature IDs used for picking and
35575
- styling. For EXT_feature_metadata, feature ID attributes are listed before
35576
- feature ID textures. If both per-primitive and per-instance feature IDs are
35577
- present, the instance feature IDs take priority.
35705
+ * Label of the feature ID set to use for picking and styling.
35706
+ <p>
35707
+ For EXT_mesh_features, this is the feature ID's label property, or
35708
+ "featureId_N" (where N is the index in the featureIds array) when not
35709
+ specified. EXT_feature_metadata did not have a label field, so such
35710
+ feature ID sets are always labeled "featureId_N" where N is the index in
35711
+ the list of all feature Ids, where feature ID attributes are listed before
35712
+ feature ID textures.
35713
+ </p>
35714
+ <p>
35715
+ If featureIdLabel is set to an integer N, it is converted to
35716
+ the string "featureId_N" automatically. If both per-primitive and
35717
+ per-instance feature IDs are present, the instance feature IDs take
35718
+ priority.
35719
+ </p>
35720
+ */
35721
+ featureIdLabel: string;
35722
+ /**
35723
+ * Label of the instance feature ID set used for picking and styling.
35724
+ <p>
35725
+ If instanceFeatureIdLabel is set to an integer N, it is converted to
35726
+ the string "instanceFeatureId_N" automatically.
35727
+ If both per-primitive and per-instance feature IDs are present, the
35728
+ instance feature IDs take priority.
35729
+ </p>
35578
35730
  */
35579
- readonly featureIdIndex: number;
35731
+ instanceFeatureIdLabel: string;
35580
35732
  /**
35581
- * The index into the list of instance feature IDs used for picking and
35582
- styling. If both per-primitive and per-instance feature IDs are present,
35583
- the instance feature IDs take priority.
35733
+ * The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
35584
35734
  */
35585
- instanceFeatureIdIndex: number;
35735
+ clippingPlanes: ClippingPlaneCollection;
35736
+ /**
35737
+ * The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
35738
+ <p>
35739
+ Disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code> will make the
35740
+ model much darker. Here, increasing the intensity of the light source will make the model brighter.
35741
+ </p>
35742
+ */
35743
+ lightColor: Cartesian3;
35744
+ /**
35745
+ * The properties for managing image-based lighting on this model.
35746
+ */
35747
+ imageBasedLighting: ImageBasedLighting;
35748
+ /**
35749
+ * Whether to cull back-facing geometry. When true, back face culling is
35750
+ determined by the material's doubleSided property; when false, back face
35751
+ culling is disabled. Back faces are not culled if the model's color is
35752
+ translucent.
35753
+ */
35754
+ backFaceCulling: boolean;
35755
+ /**
35756
+ * A uniform scale applied to this model before the {@link Model#modelMatrix}.
35757
+ Values greater than <code>1.0</code> increase the size of the model; values
35758
+ less than <code>1.0</code> decrease.
35759
+ */
35760
+ scale: number;
35761
+ /**
35762
+ * The approximate minimum pixel size of the model regardless of zoom.
35763
+ This can be used to ensure that a model is visible even when the viewer
35764
+ zooms out. When <code>0.0</code>, no minimum size is enforced.
35765
+ */
35766
+ minimumPixelSize: number;
35767
+ /**
35768
+ * The maximum scale size for a model. This can be used to give
35769
+ an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
35770
+ is never an unreasonable scale.
35771
+ */
35772
+ maximumScale: number;
35773
+ /**
35774
+ * Determines whether the model casts or receives shadows from light sources.
35775
+ */
35776
+ shadows: ShadowMode;
35586
35777
  /**
35587
35778
  * Gets or sets whether the credits of the model will be displayed on the screen
35588
35779
  */
35589
35780
  showCreditsOnScreen: boolean;
35781
+ /**
35782
+ * The {@link SplitDirection} to apply to this model.
35783
+ */
35784
+ splitDirection: SplitDirection;
35590
35785
  /**
35591
35786
  * Called when {@link Viewer} or {@link CesiumWidget} render the scene to
35592
35787
  get the draw commands needed to render this primitive.
@@ -35626,6 +35821,9 @@ export class ModelExperimental {
35626
35821
  * @param options.gltf - A Resource/URL to a glTF/glb file, a binary glTF buffer, or a JSON object containing the glTF contents
35627
35822
  * @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
35628
35823
  * @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms the model from model to world coordinates.
35824
+ * @param [options.scale = 1.0] - A uniform scale applied to this model.
35825
+ * @param [options.minimumPixelSize = 0.0] - The approximate minimum pixel size of the model regardless of zoom.
35826
+ * @param [options.maximumScale] - The maximum scale size of a model. An upper limit for minimumPixelSize.
35629
35827
  * @param [options.incrementallyLoadTextures = true] - Determine if textures may continue to stream in after the model is loaded.
35630
35828
  * @param [options.releaseGltfJson = false] - When true, the glTF JSON is released once the glTF is loaded. This is is especially useful for cases like 3D Tiles, where each .gltf model is unique and caching the glTF JSON is not effective.
35631
35829
  * @param [options.debugShowBoundingVolume = false] - For debugging only. Draws the bounding sphere for each draw command in the model.
@@ -35640,18 +35838,25 @@ export class ModelExperimental {
35640
35838
  * @param [options.color] - A color that blends with the model's rendered color.
35641
35839
  * @param [options.colorBlendMode = ColorBlendMode.HIGHLIGHT] - Defines how the color blends with the model.
35642
35840
  * @param [options.colorBlendAmount = 0.5] - Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
35643
- * @param [options.featureIdIndex = 0] - The index into the list of primitive feature IDs used for picking and styling. For EXT_feature_metadata, feature ID attributes are listed before feature ID textures. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35644
- * @param [options.instanceFeatureIdIndex = 0] - The index into the list of instance feature IDs used for picking and styling. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35841
+ * @param [options.featureIdLabel = "featureId_0"] - Label of the feature ID set to use for picking and styling. For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures. If featureIdLabel is an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35842
+ * @param [options.instanceFeatureIdLabel = "instanceFeatureId_0"] - Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority.
35645
35843
  * @param [options.pointCloudShading] - Options for constructing a {@link PointCloudShading} object to control point attenuation and lighting.
35844
+ * @param [options.clippingPlanes] - The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
35845
+ * @param [options.lightColor] - The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
35846
+ * @param [options.imageBasedLighting] - The properties for managing image-based lighting on this model.
35646
35847
  * @param [options.backFaceCulling = true] - Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if the model's color is translucent.
35647
35848
  * @param [options.shadows = ShadowMode.ENABLED] - Determines whether the model casts or receives shadows from light sources.
35648
35849
  * @param [options.showCreditsOnScreen = false] - Whether to display the credits of this model on screen.
35850
+ * @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this model.
35649
35851
  * @returns The newly created model.
35650
35852
  */
35651
35853
  static fromGltf(options: {
35652
35854
  gltf: string | Resource | Uint8Array | any;
35653
35855
  basePath?: string | Resource;
35654
35856
  modelMatrix?: Matrix4;
35857
+ scale?: number;
35858
+ minimumPixelSize?: number;
35859
+ maximumScale?: number;
35655
35860
  incrementallyLoadTextures?: boolean;
35656
35861
  releaseGltfJson?: boolean;
35657
35862
  debugShowBoundingVolume?: boolean;
@@ -35666,12 +35871,16 @@ export class ModelExperimental {
35666
35871
  color?: Color;
35667
35872
  colorBlendMode?: ColorBlendMode;
35668
35873
  colorBlendAmount?: number;
35669
- featureIdIndex?: number;
35670
- instanceFeatureIdIndex?: number;
35874
+ featureIdLabel?: string | number;
35875
+ instanceFeatureIdLabel?: string | number;
35671
35876
  pointCloudShading?: any;
35877
+ clippingPlanes?: ClippingPlaneCollection;
35878
+ lightColor?: Cartesian3;
35879
+ imageBasedLighting?: ImageBasedLighting;
35672
35880
  backFaceCulling?: boolean;
35673
35881
  shadows?: ShadowMode;
35674
35882
  showCreditsOnScreen?: boolean;
35883
+ splitDirection?: SplitDirection;
35675
35884
  }): ModelExperimental;
35676
35885
  }
35677
35886
 
@@ -35691,19 +35900,6 @@ export var modelMatrix: Matrix4;
35691
35900
  */
35692
35901
  export var style: Cesium3DTileStyle;
35693
35902
 
35694
- /**
35695
- * Whether to cull back-facing geometry. When true, back face culling is
35696
- determined by the material's doubleSided property; when false, back face
35697
- culling is disabled. Back faces are not culled if the model's color is
35698
- translucent.
35699
- */
35700
- export var backFaceCulling: boolean;
35701
-
35702
- /**
35703
- * Determines whether the model casts or receives shadows from light sources.
35704
- */
35705
- export var shadows: ShadowMode;
35706
-
35707
35903
  /**
35708
35904
  * The indices of the children of this node in the scene graph.
35709
35905
  */
@@ -35781,15 +35977,15 @@ export class ModelFeature {
35781
35977
  getProperty(name: string): any;
35782
35978
  /**
35783
35979
  * Returns a copy of the feature's property with the given name, examining all
35784
- the metadata from the EXT_mesh_features and legacy EXT_feature_metadata glTF
35980
+ the metadata from the EXT_structural_metadata and legacy EXT_feature_metadata glTF
35785
35981
  extensions. Metadata is checked against name from most specific to most
35786
35982
  general and the first match is returned. Metadata is checked in this order:
35787
35983
  <ol>
35788
- <li>Feature metadata property by semantic</li>
35789
- <li>Feature metadata property by property ID</li>
35984
+ <li>structural metadata property by semantic</li>
35985
+ <li>structural metadata property by property ID</li>
35790
35986
  </ol>
35791
35987
  <p>
35792
- See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features Extension} as well as the
35988
+ See the {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata Extension} as well as the
35793
35989
  previous {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_feature_metadata|EXT_feature_metadata Extension} for glTF.
35794
35990
  </p>
35795
35991
  * @param name - The semantic or property ID of the feature. Semantics are checked before property IDs in each granularity of metadata.
@@ -38878,6 +39074,10 @@ export class Scene {
38878
39074
  * Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
38879
39075
  */
38880
39076
  readonly mapMode2D: MapMode2D;
39077
+ /**
39078
+ * Gets or sets the position of the splitter within the viewport. Valid values are between 0.0 and 1.0.
39079
+ */
39080
+ splitPosition: number;
38881
39081
  /**
38882
39082
  * Gets or sets the position of the Imagery splitter within the viewport. Valid values are between 0.0 and 1.0.
38883
39083
  */
@@ -38913,7 +39113,7 @@ export class Scene {
38913
39113
  /**
38914
39114
  * The sample rate of multisample antialiasing (values greater than 1 enable MSAA).
38915
39115
  */
38916
- readonly msaaSamples: number;
39116
+ msaaSamples: number;
38917
39117
  /**
38918
39118
  * Returns <code>true</code> if the Scene's context supports MSAA.
38919
39119
  */
@@ -39373,7 +39573,7 @@ export class ShadowMap {
39373
39573
  lightCamera: Camera;
39374
39574
  enabled?: boolean;
39375
39575
  isPointLight?: boolean;
39376
- pointLightRadius?: boolean;
39576
+ pointLightRadius?: number;
39377
39577
  cascadesEnabled?: boolean;
39378
39578
  numberOfCascades?: number;
39379
39579
  maximumDistance?: number;
@@ -39756,6 +39956,24 @@ export class SphereEmitter {
39756
39956
  radius: number;
39757
39957
  }
39758
39958
 
39959
+ /**
39960
+ * The direction to display a primitive or ImageryLayer relative to the {@link Scene#splitPosition}.
39961
+ */
39962
+ export enum SplitDirection {
39963
+ /**
39964
+ * Display the primitive or ImageryLayer to the left of the {@link Scene#splitPosition}.
39965
+ */
39966
+ LEFT = -1,
39967
+ /**
39968
+ * Always display the primitive or ImageryLayer.
39969
+ */
39970
+ NONE = 0,
39971
+ /**
39972
+ * Display the primitive or ImageryLayer to the right of the {@link Scene#splitPosition}.
39973
+ */
39974
+ RIGHT = 1
39975
+ }
39976
+
39759
39977
  /**
39760
39978
  * Determines the function used to compare stencil values for the stencil test.
39761
39979
  */
@@ -44353,6 +44571,7 @@ declare module "cesium/Source/Scene/GoogleEarthEnterpriseMapsProvider" { import
44353
44571
  declare module "cesium/Source/Scene/GridImageryProvider" { import { GridImageryProvider } from 'mars3d-cesium'; export default GridImageryProvider; }
44354
44572
  declare module "cesium/Source/Scene/GroundPolylinePrimitive" { import { GroundPolylinePrimitive } from 'mars3d-cesium'; export default GroundPolylinePrimitive; }
44355
44573
  declare module "cesium/Source/Scene/GroundPrimitive" { import { GroundPrimitive } from 'mars3d-cesium'; export default GroundPrimitive; }
44574
+ declare module "cesium/Source/Scene/ImageBasedLighting" { import { ImageBasedLighting } from 'mars3d-cesium'; export default ImageBasedLighting; }
44356
44575
  declare module "cesium/Source/Scene/ImageryLayer" { import { ImageryLayer } from 'mars3d-cesium'; export default ImageryLayer; }
44357
44576
  declare module "cesium/Source/Scene/ImageryLayerCollection" { import { ImageryLayerCollection } from 'mars3d-cesium'; export default ImageryLayerCollection; }
44358
44577
  declare module "cesium/Source/Scene/ImageryLayerFeatureInfo" { import { ImageryLayerFeatureInfo } from 'mars3d-cesium'; export default ImageryLayerFeatureInfo; }