mars3d-cesium 1.92.0 → 1.92.3
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.
- package/Build/Cesium/Cesium.d.ts +1397 -1390
- package/Build/Cesium/Cesium.js +8 -8
- package/Build/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +114 -115
- package/Build/Cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/Build/Cesium/Widgets/Viewer/Viewer.css +1 -1
- package/Build/Cesium/Widgets/widgets.css +1 -1
- package/Build/Cesium/Workers/{AxisAlignedBoundingBox-67e6ea73.js → AxisAlignedBoundingBox-ef345290.js} +1 -1
- package/Build/Cesium/Workers/{BoundingRectangle-26667f9b.js → BoundingRectangle-ffeef844.js} +1 -1
- package/Build/Cesium/Workers/{BoxGeometry-9cdc8b92.js → BoxGeometry-c0d41d4f.js} +1 -1
- package/Build/Cesium/Workers/{Color-ef7e91c1.js → Color-75e74066.js} +1 -1
- package/Build/Cesium/Workers/{CoplanarPolygonGeometryLibrary-042de0d0.js → CoplanarPolygonGeometryLibrary-0d63b099.js} +1 -1
- package/Build/Cesium/Workers/{CorridorGeometryLibrary-3bc63965.js → CorridorGeometryLibrary-0169e68d.js} +1 -1
- package/Build/Cesium/Workers/{CylinderGeometry-2d940a6c.js → CylinderGeometry-068eebd3.js} +1 -1
- package/Build/Cesium/Workers/{EllipseGeometry-0b2a6f30.js → EllipseGeometry-eeb1db07.js} +1 -1
- package/Build/Cesium/Workers/{EllipseGeometryLibrary-71538ff1.js → EllipseGeometryLibrary-eedf4d0b.js} +1 -1
- package/Build/Cesium/Workers/{EllipseOutlineGeometry-197fc9b2.js → EllipseOutlineGeometry-7c871752.js} +1 -1
- package/Build/Cesium/Workers/{EllipsoidGeometry-230054c9.js → EllipsoidGeometry-954ef938.js} +1 -1
- package/Build/Cesium/Workers/{EllipsoidOutlineGeometry-b4c7becf.js → EllipsoidOutlineGeometry-79998e39.js} +1 -1
- package/Build/Cesium/Workers/{EllipsoidTangentPlane-73d81019.js → EllipsoidTangentPlane-330be9cc.js} +1 -1
- package/Build/Cesium/Workers/{FrustumGeometry-70a14d9a.js → FrustumGeometry-1e1111d8.js} +1 -1
- package/Build/Cesium/Workers/{GeometryAttribute-ce92871d.js → GeometryAttribute-71155085.js} +1 -1
- package/Build/Cesium/Workers/{GeometryPipeline-b301e381.js → GeometryPipeline-b15e7fd0.js} +1 -1
- package/Build/Cesium/Workers/{IntersectionTests-5ec530d5.js → IntersectionTests-f15438d8.js} +1 -1
- package/Build/Cesium/Workers/OrientedBoundingBox-fa9056b2.js +1 -0
- package/Build/Cesium/Workers/{PolygonGeometryLibrary-58067699.js → PolygonGeometryLibrary-cb0bc5e9.js} +1 -1
- package/Build/Cesium/Workers/{PolygonPipeline-85da16de.js → PolygonPipeline-32699305.js} +1 -1
- package/Build/Cesium/Workers/{PolylinePipeline-1aca6c21.js → PolylinePipeline-39d7619d.js} +1 -1
- package/Build/Cesium/Workers/{PolylineVolumeGeometryLibrary-beeaf259.js → PolylineVolumeGeometryLibrary-bd0bbdaf.js} +1 -1
- package/Build/Cesium/Workers/{PrimitivePipeline-319f1075.js → PrimitivePipeline-e1f3eb3d.js} +1 -1
- package/Build/Cesium/Workers/{RectangleGeometryLibrary-82f244b8.js → RectangleGeometryLibrary-a44974f6.js} +1 -1
- package/Build/Cesium/Workers/{TerrainEncoding-484e2741.js → TerrainEncoding-341cc7d2.js} +1 -1
- package/Build/Cesium/Workers/{Transforms-bd15b2e7.js → Transforms-bf323bcf.js} +1 -1
- package/Build/Cesium/Workers/{WallGeometryLibrary-72a383b0.js → WallGeometryLibrary-0cfe87c2.js} +1 -1
- package/Build/Cesium/Workers/combineGeometry.js +1 -1
- package/Build/Cesium/Workers/createBoxGeometry.js +1 -1
- package/Build/Cesium/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createCircleGeometry.js +1 -1
- package/Build/Cesium/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createCorridorGeometry.js +1 -1
- package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createCylinderGeometry.js +1 -1
- package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createEllipseGeometry.js +1 -1
- package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createFrustumGeometry.js +1 -1
- package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createGeometry.js +1 -1
- package/Build/Cesium/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Cesium/Workers/createPlaneGeometry.js +1 -1
- package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createPolygonGeometry.js +1 -1
- package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createPolylineGeometry.js +1 -1
- package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createRectangleGeometry.js +1 -1
- package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Cesium/Workers/createSphereGeometry.js +1 -1
- package/Build/Cesium/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Cesium/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Cesium/Workers/createVerticesFromHeightmap.js +1 -1
- package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Cesium/Workers/createWallGeometry.js +1 -1
- package/Build/Cesium/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/LICENSE.md +1187 -1187
- package/package.json +10 -8
- package/Build/Cesium/Workers/AttributeCompression-0ee09568.js +0 -1
- package/Build/Cesium/Workers/AxisAlignedBoundingBox-0ebb51f1.js +0 -1
- package/Build/Cesium/Workers/BoundingRectangle-8d15888c.js +0 -1
- package/Build/Cesium/Workers/BoxGeometry-91a65404.js +0 -1
- package/Build/Cesium/Workers/Color-f48e883d.js +0 -1
- package/Build/Cesium/Workers/ComponentDatatype-5f63ec93.js +0 -1
- package/Build/Cesium/Workers/CoplanarPolygonGeometryLibrary-9fd8c9bf.js +0 -1
- package/Build/Cesium/Workers/CorridorGeometryLibrary-2c8a56b1.js +0 -1
- package/Build/Cesium/Workers/CylinderGeometry-4c9fdff8.js +0 -1
- package/Build/Cesium/Workers/CylinderGeometryLibrary-6799e174.js +0 -1
- package/Build/Cesium/Workers/EllipseGeometry-2c8825bb.js +0 -1
- package/Build/Cesium/Workers/EllipseGeometryLibrary-2c9e8629.js +0 -1
- package/Build/Cesium/Workers/EllipseOutlineGeometry-5a01e7f9.js +0 -1
- package/Build/Cesium/Workers/EllipsoidGeodesic-412b0c43.js +0 -1
- package/Build/Cesium/Workers/EllipsoidGeometry-51deea95.js +0 -1
- package/Build/Cesium/Workers/EllipsoidOutlineGeometry-6f5a7019.js +0 -1
- package/Build/Cesium/Workers/EllipsoidRhumbLine-0893952b.js +0 -1
- package/Build/Cesium/Workers/EllipsoidTangentPlane-3f1b123a.js +0 -1
- package/Build/Cesium/Workers/EncodedCartesian3-55eee0ea.js +0 -1
- package/Build/Cesium/Workers/FrustumGeometry-33d96e4a.js +0 -1
- package/Build/Cesium/Workers/GeometryAttribute-4b6dfc85.js +0 -1
- package/Build/Cesium/Workers/GeometryAttributes-b253752a.js +0 -1
- package/Build/Cesium/Workers/GeometryInstance-28411208.js +0 -1
- package/Build/Cesium/Workers/GeometryOffsetAttribute-369d5efa.js +0 -1
- package/Build/Cesium/Workers/GeometryPipeline-c36432c1.js +0 -1
- package/Build/Cesium/Workers/IndexDatatype-c2b69fc2.js +0 -1
- package/Build/Cesium/Workers/IntersectionTests-3a1d2826.js +0 -1
- package/Build/Cesium/Workers/Matrix2-f0fc6cd3.js +0 -1
- package/Build/Cesium/Workers/OrientedBoundingBox-1136cfae.js +0 -1
- package/Build/Cesium/Workers/OrientedBoundingBox-d1d264af.js +0 -1
- package/Build/Cesium/Workers/Plane-863ea815.js +0 -1
- package/Build/Cesium/Workers/PolygonGeometryLibrary-0cf237e6.js +0 -1
- package/Build/Cesium/Workers/PolygonPipeline-583f5389.js +0 -1
- package/Build/Cesium/Workers/PolylinePipeline-8d9de722.js +0 -1
- package/Build/Cesium/Workers/PolylineVolumeGeometryLibrary-d3ae69ea.js +0 -1
- package/Build/Cesium/Workers/PrimitivePipeline-1907e610.js +0 -1
- package/Build/Cesium/Workers/RectangleGeometryLibrary-a2a41ed9.js +0 -1
- package/Build/Cesium/Workers/RuntimeError-8f3d96ee.js +0 -1
- package/Build/Cesium/Workers/TerrainEncoding-047c0bfb.js +0 -1
- package/Build/Cesium/Workers/Transforms-4a1d2c0e.js +0 -39
- package/Build/Cesium/Workers/VertexFormat-af764a6f.js +0 -1
- package/Build/Cesium/Workers/WallGeometryLibrary-5c745ea0.js +0 -1
- package/Build/Cesium/Workers/WebMercatorProjection-9d9a5a33.js +0 -1
- package/Build/Cesium/Workers/arrayRemoveDuplicates-7cd4e18c.js +0 -1
- package/Build/Cesium/Workers/combine-6d9c3903.js +0 -1
- package/Build/Cesium/Workers/when-229515d6.js +0 -3
package/Build/Cesium/Cesium.d.ts
CHANGED
|
@@ -8725,20 +8725,20 @@ export class IonResource extends Resource {
|
|
|
8725
8725
|
clone(result?: Resource): Resource;
|
|
8726
8726
|
/**
|
|
8727
8727
|
* Asynchronously loads the given image resource. Returns a promise that will resolve to
|
|
8728
|
-
|
|
8729
|
-
|
|
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.
|
|
8730
8730
|
* @example
|
|
8731
8731
|
* // load a single image asynchronously
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
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
|
+
});
|
|
8742
8742
|
* @param [options] - An object with the following properties.
|
|
8743
8743
|
* @param [options.preferBlob = false] - If true, we will load the image via a blob.
|
|
8744
8744
|
* @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
|
|
@@ -14750,33 +14750,33 @@ export enum RequestType {
|
|
|
14750
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.
|
|
14751
14751
|
* @example
|
|
14752
14752
|
* function refreshTokenRetryCallback(resource, error) {
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
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
|
+
});
|
|
14780
14780
|
* @param options - A url or an object with the following properties
|
|
14781
14781
|
* @param options.url - The url of the resource.
|
|
14782
14782
|
* @param [options.queryParameters] - An object containing query parameters that will be sent when retrieving the resource.
|
|
@@ -14856,7 +14856,7 @@ export class Resource {
|
|
|
14856
14856
|
hasHeaders: boolean;
|
|
14857
14857
|
/**
|
|
14858
14858
|
* Override Object#toString so that implicit string conversion gives the
|
|
14859
|
-
|
|
14859
|
+
complete URL represented by this Resource.
|
|
14860
14860
|
* @returns The URL represented by this Resource
|
|
14861
14861
|
*/
|
|
14862
14862
|
toString(): string;
|
|
@@ -14869,20 +14869,20 @@ export class Resource {
|
|
|
14869
14869
|
getUrlComponent(query?: boolean, proxy?: boolean): string;
|
|
14870
14870
|
/**
|
|
14871
14871
|
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
|
|
14872
|
-
|
|
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.
|
|
14873
14873
|
* @param params - The query parameters
|
|
14874
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.
|
|
14875
14875
|
*/
|
|
14876
14876
|
setQueryParameters(params: any, useAsDefault?: boolean): void;
|
|
14877
14877
|
/**
|
|
14878
14878
|
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
|
|
14879
|
-
|
|
14879
|
+
as opposed to adding them one at a time to the queryParameters property.
|
|
14880
14880
|
* @param params - The query parameters
|
|
14881
14881
|
*/
|
|
14882
14882
|
appendQueryParameters(params: any): void;
|
|
14883
14883
|
/**
|
|
14884
14884
|
* Combines the specified object and the existing template values. This allows you to add many values at once,
|
|
14885
|
-
|
|
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.
|
|
14886
14886
|
* @param template - The template values
|
|
14887
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.
|
|
14888
14888
|
*/
|
|
@@ -14930,16 +14930,16 @@ export class Resource {
|
|
|
14930
14930
|
appendForwardSlash(): void;
|
|
14931
14931
|
/**
|
|
14932
14932
|
* Asynchronously loads the resource as raw binary data. Returns a promise that will resolve to
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
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.
|
|
14936
14936
|
* @example
|
|
14937
14937
|
* // load a single URL asynchronously
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14938
|
+
resource.fetchArrayBuffer().then(function(arrayBuffer) {
|
|
14939
|
+
// use the data
|
|
14940
|
+
}).catch(function(error) {
|
|
14941
|
+
// an error occurred
|
|
14942
|
+
});
|
|
14943
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.
|
|
14944
14944
|
*/
|
|
14945
14945
|
fetchArrayBuffer(): Promise<ArrayBuffer> | undefined;
|
|
@@ -14968,16 +14968,16 @@ export class Resource {
|
|
|
14968
14968
|
}): Promise<ArrayBuffer> | undefined;
|
|
14969
14969
|
/**
|
|
14970
14970
|
* Asynchronously loads the given resource as a blob. Returns a promise that will resolve to
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
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.
|
|
14974
14974
|
* @example
|
|
14975
14975
|
* // load a single URL asynchronously
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14976
|
+
resource.fetchBlob().then(function(blob) {
|
|
14977
|
+
// use the data
|
|
14978
|
+
}).catch(function(error) {
|
|
14979
|
+
// an error occurred
|
|
14980
|
+
});
|
|
14981
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.
|
|
14982
14982
|
*/
|
|
14983
14983
|
fetchBlob(): Promise<Blob> | undefined;
|
|
@@ -15006,20 +15006,20 @@ export class Resource {
|
|
|
15006
15006
|
}): Promise<Blob> | undefined;
|
|
15007
15007
|
/**
|
|
15008
15008
|
* Asynchronously loads the given image resource. Returns a promise that will resolve to
|
|
15009
|
-
|
|
15010
|
-
|
|
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.
|
|
15011
15011
|
* @example
|
|
15012
15012
|
* // load a single image asynchronously
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15022
|
-
|
|
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
|
+
});
|
|
15023
15023
|
* @param [options] - An object with the following properties.
|
|
15024
15024
|
* @param [options.preferBlob = false] - If true, we will load the image via a blob.
|
|
15025
15025
|
* @param [options.preferImageBitmap = false] - If true, image will be decoded during fetch and an <code>ImageBitmap</code> is returned.
|
|
@@ -15066,22 +15066,22 @@ export class Resource {
|
|
|
15066
15066
|
}): Promise<ImageBitmap> | Promise<HTMLImageElement> | undefined;
|
|
15067
15067
|
/**
|
|
15068
15068
|
* Asynchronously loads the given resource as text. Returns a promise that will resolve to
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
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.
|
|
15072
15072
|
* @example
|
|
15073
15073
|
* // load text from a URL, setting a custom header
|
|
15074
|
-
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
|
|
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
|
+
});
|
|
15085
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.
|
|
15086
15086
|
*/
|
|
15087
15087
|
fetchText(): Promise<string> | undefined;
|
|
@@ -15110,17 +15110,17 @@ export class Resource {
|
|
|
15110
15110
|
}): Promise<string> | undefined;
|
|
15111
15111
|
/**
|
|
15112
15112
|
* Asynchronously loads the given resource as JSON. Returns a promise that will resolve to
|
|
15113
|
-
|
|
15114
|
-
|
|
15115
|
-
|
|
15116
|
-
|
|
15117
|
-
|
|
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,*/*;q=0.01' to the request headers, if not
|
|
15117
|
+
already specified.
|
|
15118
15118
|
* @example
|
|
15119
15119
|
* resource.fetchJson().then(function(jsonData) {
|
|
15120
|
-
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
|
|
15120
|
+
// Do something with the JSON object
|
|
15121
|
+
}).catch(function(error) {
|
|
15122
|
+
// an error occurred
|
|
15123
|
+
});
|
|
15124
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.
|
|
15125
15125
|
*/
|
|
15126
15126
|
fetchJson(): Promise<any> | undefined;
|
|
@@ -15149,18 +15149,18 @@ export class Resource {
|
|
|
15149
15149
|
}): Promise<any> | undefined;
|
|
15150
15150
|
/**
|
|
15151
15151
|
* Asynchronously loads the given resource as XML. Returns a promise that will resolve to
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
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.
|
|
15155
15155
|
* @example
|
|
15156
15156
|
* // load XML from a URL, setting a custom header
|
|
15157
|
-
|
|
15158
|
-
|
|
15159
|
-
|
|
15160
|
-
|
|
15161
|
-
|
|
15162
|
-
|
|
15163
|
-
|
|
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
|
+
});
|
|
15164
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.
|
|
15165
15165
|
*/
|
|
15166
15166
|
fetchXML(): Promise<XMLDocument> | undefined;
|
|
@@ -15191,11 +15191,11 @@ export class Resource {
|
|
|
15191
15191
|
* Requests a resource using JSONP.
|
|
15192
15192
|
* @example
|
|
15193
15193
|
* // load a data asynchronously
|
|
15194
|
-
|
|
15195
|
-
|
|
15196
|
-
|
|
15197
|
-
|
|
15198
|
-
|
|
15194
|
+
resource.fetchJsonp().then(function(data) {
|
|
15195
|
+
// use the loaded data
|
|
15196
|
+
}).catch(function(error) {
|
|
15197
|
+
// an error occurred
|
|
15198
|
+
});
|
|
15199
15199
|
* @param [callbackParameterName = 'callback'] - The callback parameter name that the server expects.
|
|
15200
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.
|
|
15201
15201
|
*/
|
|
@@ -15227,17 +15227,17 @@ export class Resource {
|
|
|
15227
15227
|
}): Promise<any> | undefined;
|
|
15228
15228
|
/**
|
|
15229
15229
|
* Asynchronously loads the given resource. Returns a promise that will resolve to
|
|
15230
|
-
|
|
15231
|
-
|
|
15232
|
-
|
|
15233
|
-
|
|
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.
|
|
15234
15234
|
* @example
|
|
15235
15235
|
* resource.fetch()
|
|
15236
|
-
|
|
15237
|
-
|
|
15238
|
-
|
|
15239
|
-
|
|
15240
|
-
|
|
15236
|
+
.then(function(body) {
|
|
15237
|
+
// use the data
|
|
15238
|
+
}).catch(function(error) {
|
|
15239
|
+
// an error occurred
|
|
15240
|
+
});
|
|
15241
15241
|
* @param [options] - Object with the following properties:
|
|
15242
15242
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
15243
15243
|
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
|
|
@@ -15278,16 +15278,16 @@ export class Resource {
|
|
|
15278
15278
|
}): Promise<any> | undefined;
|
|
15279
15279
|
/**
|
|
15280
15280
|
* Asynchronously deletes the given resource. Returns a promise that will resolve to
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
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.
|
|
15284
15284
|
* @example
|
|
15285
15285
|
* resource.delete()
|
|
15286
|
-
|
|
15287
|
-
|
|
15288
|
-
|
|
15289
|
-
|
|
15290
|
-
|
|
15286
|
+
.then(function(body) {
|
|
15287
|
+
// use the data
|
|
15288
|
+
}).catch(function(error) {
|
|
15289
|
+
// an error occurred
|
|
15290
|
+
});
|
|
15291
15291
|
* @param [options] - Object with the following properties:
|
|
15292
15292
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
15293
15293
|
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
|
|
@@ -15330,16 +15330,16 @@ export class Resource {
|
|
|
15330
15330
|
}): Promise<any> | undefined;
|
|
15331
15331
|
/**
|
|
15332
15332
|
* Asynchronously gets headers the given resource. Returns a promise that will resolve to
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
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.
|
|
15336
15336
|
* @example
|
|
15337
15337
|
* resource.head()
|
|
15338
|
-
|
|
15339
|
-
|
|
15340
|
-
|
|
15341
|
-
|
|
15342
|
-
|
|
15338
|
+
.then(function(headers) {
|
|
15339
|
+
// use the data
|
|
15340
|
+
}).catch(function(error) {
|
|
15341
|
+
// an error occurred
|
|
15342
|
+
});
|
|
15343
15343
|
* @param [options] - Object with the following properties:
|
|
15344
15344
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
15345
15345
|
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
|
|
@@ -15380,16 +15380,16 @@ export class Resource {
|
|
|
15380
15380
|
}): Promise<any> | undefined;
|
|
15381
15381
|
/**
|
|
15382
15382
|
* Asynchronously gets options the given resource. Returns a promise that will resolve to
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
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.
|
|
15386
15386
|
* @example
|
|
15387
15387
|
* resource.options()
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15388
|
+
.then(function(headers) {
|
|
15389
|
+
// use the data
|
|
15390
|
+
}).catch(function(error) {
|
|
15391
|
+
// an error occurred
|
|
15392
|
+
});
|
|
15393
15393
|
* @param [options] - Object with the following properties:
|
|
15394
15394
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
15395
15395
|
* @param [options.headers] - Additional HTTP headers to send with the request, if any.
|
|
@@ -15430,16 +15430,16 @@ export class Resource {
|
|
|
15430
15430
|
}): Promise<any> | undefined;
|
|
15431
15431
|
/**
|
|
15432
15432
|
* Asynchronously posts data to the given resource. Returns a promise that will resolve to
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
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.
|
|
15436
15436
|
* @example
|
|
15437
15437
|
* resource.post(data)
|
|
15438
|
-
|
|
15439
|
-
|
|
15440
|
-
|
|
15441
|
-
|
|
15442
|
-
|
|
15438
|
+
.then(function(result) {
|
|
15439
|
+
// use the result
|
|
15440
|
+
}).catch(function(error) {
|
|
15441
|
+
// an error occurred
|
|
15442
|
+
});
|
|
15443
15443
|
* @param data - Data that is posted with the resource.
|
|
15444
15444
|
* @param [options] - Object with the following properties:
|
|
15445
15445
|
* @param [options.data] - Data that is posted with the resource.
|
|
@@ -15485,16 +15485,16 @@ export class Resource {
|
|
|
15485
15485
|
}): Promise<any> | undefined;
|
|
15486
15486
|
/**
|
|
15487
15487
|
* Asynchronously puts data to the given resource. Returns a promise that will resolve to
|
|
15488
|
-
|
|
15489
|
-
|
|
15490
|
-
|
|
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.
|
|
15491
15491
|
* @example
|
|
15492
15492
|
* resource.put(data)
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15493
|
+
.then(function(result) {
|
|
15494
|
+
// use the result
|
|
15495
|
+
}).catch(function(error) {
|
|
15496
|
+
// an error occurred
|
|
15497
|
+
});
|
|
15498
15498
|
* @param data - Data that is posted with the resource.
|
|
15499
15499
|
* @param [options] - Object with the following properties:
|
|
15500
15500
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
@@ -15538,16 +15538,16 @@ export class Resource {
|
|
|
15538
15538
|
}): Promise<any> | undefined;
|
|
15539
15539
|
/**
|
|
15540
15540
|
* Asynchronously patches data to the given resource. Returns a promise that will resolve to
|
|
15541
|
-
|
|
15542
|
-
|
|
15543
|
-
|
|
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.
|
|
15544
15544
|
* @example
|
|
15545
15545
|
* resource.patch(data)
|
|
15546
|
-
|
|
15547
|
-
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15546
|
+
.then(function(result) {
|
|
15547
|
+
// use the result
|
|
15548
|
+
}).catch(function(error) {
|
|
15549
|
+
// an error occurred
|
|
15550
|
+
});
|
|
15551
15551
|
* @param data - Data that is posted with the resource.
|
|
15552
15552
|
* @param [options] - Object with the following properties:
|
|
15553
15553
|
* @param [options.responseType] - The type of response. This controls the type of item returned.
|
|
@@ -21469,76 +21469,92 @@ export class KmlCamera {
|
|
|
21469
21469
|
export namespace KmlDataSource {
|
|
21470
21470
|
/**
|
|
21471
21471
|
* Initialization options for the `load` method.
|
|
21472
|
-
* @property camera - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21473
|
-
* @property canvas - The canvas that is used for sending viewer properties to network links.
|
|
21474
21472
|
* @property [sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21475
21473
|
* @property [clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
|
|
21476
21474
|
* @property [ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21477
|
-
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
21478
21475
|
* @property [screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21479
21476
|
*/
|
|
21480
21477
|
type LoadOptions = {
|
|
21481
|
-
camera: Camera;
|
|
21482
|
-
canvas: HTMLCanvasElement;
|
|
21483
21478
|
sourceUri?: string;
|
|
21484
21479
|
clampToGround?: boolean;
|
|
21485
21480
|
ellipsoid?: Ellipsoid;
|
|
21481
|
+
screenOverlayContainer?: Element | string;
|
|
21482
|
+
};
|
|
21483
|
+
/**
|
|
21484
|
+
* Options for constructing a new KmlDataSource, or calling the static `load` method.
|
|
21485
|
+
* @property [camera] - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21486
|
+
* @property [canvas] - The canvas that is used for sending viewer properties to network links.
|
|
21487
|
+
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
21488
|
+
* @property [sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21489
|
+
* @property [clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
|
|
21490
|
+
* @property [ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21491
|
+
* @property [screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21492
|
+
*/
|
|
21493
|
+
type ConstructorOptions = {
|
|
21494
|
+
camera?: Camera;
|
|
21495
|
+
canvas?: HTMLCanvasElement;
|
|
21486
21496
|
credit?: Credit | string;
|
|
21497
|
+
sourceUri?: string;
|
|
21498
|
+
clampToGround?: boolean;
|
|
21499
|
+
ellipsoid?: Ellipsoid;
|
|
21487
21500
|
screenOverlayContainer?: Element | string;
|
|
21488
21501
|
};
|
|
21489
21502
|
}
|
|
21490
21503
|
|
|
21491
21504
|
/**
|
|
21492
21505
|
* A {@link DataSource} which processes Keyhole Markup Language 2.2 (KML).
|
|
21493
|
-
<p>
|
|
21494
|
-
KML support in Cesium is incomplete, but a large amount of the standard,
|
|
21495
|
-
as well as Google's <code>gx</code> extension namespace, is supported. See Github issue
|
|
21496
|
-
{@link https://github.com/CesiumGS/cesium/issues/873|#873} for a
|
|
21497
|
-
detailed list of what is and isn't supported. Cesium will also write information to the
|
|
21498
|
-
console when it encounters most unsupported features.
|
|
21499
|
-
</p>
|
|
21500
|
-
<p>
|
|
21501
|
-
Non visual feature data, such as <code>atom:author</code> and <code>ExtendedData</code>
|
|
21502
|
-
is exposed via an instance of {@link KmlFeatureData}, which is added to each {@link Entity}
|
|
21503
|
-
under the <code>kml</code> property.
|
|
21504
|
-
</p>
|
|
21506
|
+
* <p>
|
|
21507
|
+
* KML support in Cesium is incomplete, but a large amount of the standard,
|
|
21508
|
+
* as well as Google's <code>gx</code> extension namespace, is supported. See Github issue
|
|
21509
|
+
* {@link https://github.com/CesiumGS/cesium/issues/873|#873} for a
|
|
21510
|
+
* detailed list of what is and isn't supported. Cesium will also write information to the
|
|
21511
|
+
* console when it encounters most unsupported features.
|
|
21512
|
+
* </p>
|
|
21513
|
+
* <p>
|
|
21514
|
+
* Non visual feature data, such as <code>atom:author</code> and <code>ExtendedData</code>
|
|
21515
|
+
* is exposed via an instance of {@link KmlFeatureData}, which is added to each {@link Entity}
|
|
21516
|
+
* under the <code>kml</code> property.
|
|
21517
|
+
* </p>
|
|
21505
21518
|
* @example
|
|
21506
21519
|
* const viewer = new Cesium.Viewer('cesiumContainer');
|
|
21507
|
-
viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/facilities.kmz',
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
);
|
|
21513
|
-
* @param options -
|
|
21514
|
-
* @param options.camera - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21515
|
-
* @param options.canvas - The canvas that is used for sending viewer properties to network links.
|
|
21516
|
-
* @param [options.ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21517
|
-
* @param [options.credit] - A credit for the data source, which is displayed on the canvas.
|
|
21520
|
+
* viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/facilities.kmz',
|
|
21521
|
+
* {
|
|
21522
|
+
* camera: viewer.scene.camera,
|
|
21523
|
+
* canvas: viewer.scene.canvas
|
|
21524
|
+
* })
|
|
21525
|
+
* );
|
|
21526
|
+
* @param [options] - Object describing initialization options
|
|
21518
21527
|
*/
|
|
21519
21528
|
export class KmlDataSource {
|
|
21520
|
-
constructor(options
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21529
|
+
constructor(options?: KmlDataSource.ConstructorOptions);
|
|
21530
|
+
/**
|
|
21531
|
+
* The current size of this Canvas will be used to populate the Link parameters
|
|
21532
|
+
* for client height and width.
|
|
21533
|
+
*/
|
|
21534
|
+
canvas: HTMLCanvasElement | undefined;
|
|
21535
|
+
/**
|
|
21536
|
+
* The position and orientation of this {@link Camera} will be used to
|
|
21537
|
+
* populate various camera parameters when making network requests.
|
|
21538
|
+
* Camera movement will determine when to trigger NetworkLink refresh if
|
|
21539
|
+
* <code>viewRefreshMode</code> is <code>onStop</code>.
|
|
21540
|
+
*/
|
|
21541
|
+
camera: Camera | undefined;
|
|
21526
21542
|
/**
|
|
21527
21543
|
* Creates a Promise to a new instance loaded with the provided KML data.
|
|
21528
21544
|
* @param data - A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
21529
21545
|
* @param [options] - An object specifying configuration options
|
|
21530
21546
|
* @returns A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
|
|
21531
21547
|
*/
|
|
21532
|
-
static load(data: Resource | string | Document | Blob, options?: KmlDataSource.
|
|
21548
|
+
static load(data: Resource | string | Document | Blob, options?: KmlDataSource.ConstructorOptions): Promise<KmlDataSource>;
|
|
21533
21549
|
/**
|
|
21534
21550
|
* Gets or sets a human-readable name for this instance.
|
|
21535
|
-
|
|
21551
|
+
* This will be automatically be set to the KML document name on load.
|
|
21536
21552
|
*/
|
|
21537
21553
|
name: string;
|
|
21538
21554
|
/**
|
|
21539
21555
|
* Gets the clock settings defined by the loaded KML. This represents the total
|
|
21540
|
-
|
|
21541
|
-
|
|
21556
|
+
* availability interval for all time-dynamic data. If the KML does not contain
|
|
21557
|
+
* time-dynamic data, this value is undefined.
|
|
21542
21558
|
*/
|
|
21543
21559
|
clock: DataSourceClock;
|
|
21544
21560
|
/**
|
|
@@ -21588,19 +21604,10 @@ export class KmlDataSource {
|
|
|
21588
21604
|
/**
|
|
21589
21605
|
* Asynchronously loads the provided KML data, replacing any existing data.
|
|
21590
21606
|
* @param data - A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
21591
|
-
* @param [options] - An object
|
|
21592
|
-
* @param [options.sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21593
|
-
* @param [options.clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground. If true, lines will use corridors so use Entity.corridor instead of Entity.polyline.
|
|
21594
|
-
* @param [options.ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21595
|
-
* @param [options.screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21607
|
+
* @param [options] - An object specifying configuration options
|
|
21596
21608
|
* @returns A promise that will resolve to this instances once the KML is loaded.
|
|
21597
21609
|
*/
|
|
21598
|
-
load(data: Resource | string | Document | Blob, options?:
|
|
21599
|
-
sourceUri?: Resource | string;
|
|
21600
|
-
clampToGround?: boolean;
|
|
21601
|
-
ellipsoid?: Ellipsoid;
|
|
21602
|
-
screenOverlayContainer?: Element | string;
|
|
21603
|
-
}): Promise<KmlDataSource>;
|
|
21610
|
+
load(data: Resource | string | Document | Blob, options?: KmlDataSource.LoadOptions): Promise<KmlDataSource>;
|
|
21604
21611
|
/**
|
|
21605
21612
|
* Cleans up any non-entity elements created by the data source. Currently this only affects ScreenOverlay elements.
|
|
21606
21613
|
*/
|
|
@@ -21640,8 +21647,8 @@ export class KmlFeatureData {
|
|
|
21640
21647
|
snippet: string;
|
|
21641
21648
|
/**
|
|
21642
21649
|
* Gets the extended data, parsed into a JSON object.
|
|
21643
|
-
|
|
21644
|
-
|
|
21650
|
+
* Currently only the <code>Data</code> property is supported.
|
|
21651
|
+
* <code>SchemaData</code> and custom data are ignored.
|
|
21645
21652
|
*/
|
|
21646
21653
|
extendedData: string;
|
|
21647
21654
|
}
|
|
@@ -22289,7 +22296,7 @@ export class ModelVisualizer {
|
|
|
22289
22296
|
constructor(scene: Scene, entityCollection: EntityCollection);
|
|
22290
22297
|
/**
|
|
22291
22298
|
* Updates models created this visualizer to match their
|
|
22292
|
-
|
|
22299
|
+
* Entity counterpart at the given time.
|
|
22293
22300
|
* @param time - The time to update to.
|
|
22294
22301
|
* @returns This function always returns true.
|
|
22295
22302
|
*/
|
|
@@ -25216,19 +25223,19 @@ export enum Axis {
|
|
|
25216
25223
|
|
|
25217
25224
|
/**
|
|
25218
25225
|
* A viewport-aligned image positioned in the 3D scene, that is created
|
|
25219
|
-
and rendered using a {@link BillboardCollection}. A billboard is created and its initial
|
|
25220
|
-
properties are set by calling {@link BillboardCollection#add}.
|
|
25221
|
-
<br /><br />
|
|
25222
|
-
<div align='center'>
|
|
25223
|
-
<img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
25224
|
-
Example billboards
|
|
25225
|
-
</div>
|
|
25226
|
+
* and rendered using a {@link BillboardCollection}. A billboard is created and its initial
|
|
25227
|
+
* properties are set by calling {@link BillboardCollection#add}.
|
|
25228
|
+
* <br /><br />
|
|
25229
|
+
* <div align='center'>
|
|
25230
|
+
* <img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
25231
|
+
* Example billboards
|
|
25232
|
+
* </div>
|
|
25226
25233
|
*/
|
|
25227
25234
|
export class Billboard {
|
|
25228
25235
|
constructor();
|
|
25229
25236
|
/**
|
|
25230
25237
|
* Determines if this billboard will be shown. Use this to hide or show a billboard, instead
|
|
25231
|
-
|
|
25238
|
+
* of removing it and re-adding it to the collection.
|
|
25232
25239
|
*/
|
|
25233
25240
|
show: boolean;
|
|
25234
25241
|
/**
|
|
@@ -25241,159 +25248,159 @@ export class Billboard {
|
|
|
25241
25248
|
heightReference: HeightReference;
|
|
25242
25249
|
/**
|
|
25243
25250
|
* Gets or sets the pixel offset in screen space from the origin of this billboard. This is commonly used
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
|
|
25251
|
-
|
|
25252
|
-
|
|
25253
|
-
|
|
25254
|
-
|
|
25251
|
+
* to align multiple billboards and labels at the same position, e.g., an image and text. The
|
|
25252
|
+
* screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
25253
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
25254
|
+
* <br /><br />
|
|
25255
|
+
* <div align='center'>
|
|
25256
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25257
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setPixelOffset.default.png' width='250' height='188' /></td>
|
|
25258
|
+
* <td align='center'><code>b.pixeloffset = new Cartesian2(50, 25);</code><br/><img src='Images/Billboard.setPixelOffset.x50y-25.png' width='250' height='188' /></td>
|
|
25259
|
+
* </tr></table>
|
|
25260
|
+
* The billboard's origin is indicated by the yellow point.
|
|
25261
|
+
* </div>
|
|
25255
25262
|
*/
|
|
25256
25263
|
pixelOffset: Cartesian2;
|
|
25257
25264
|
/**
|
|
25258
25265
|
* Gets or sets near and far scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25259
|
-
|
|
25260
|
-
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
|
|
25266
|
+
* A billboard's scale will interpolate between the {@link NearFarScalar#nearValue} and
|
|
25267
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25268
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25269
|
+
* Outside of these ranges the billboard's scale remains clamped to the nearest bound. If undefined,
|
|
25270
|
+
* scaleByDistance will be disabled.
|
|
25264
25271
|
* @example
|
|
25265
25272
|
* // Example 1.
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25273
|
+
* // Set a billboard's scaleByDistance to scale by 1.5 when the
|
|
25274
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
25275
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
25276
|
+
* b.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
|
|
25270
25277
|
* @example
|
|
25271
25278
|
* // Example 2.
|
|
25272
|
-
|
|
25273
|
-
|
|
25279
|
+
* // disable scaling by distance
|
|
25280
|
+
* b.scaleByDistance = undefined;
|
|
25274
25281
|
*/
|
|
25275
25282
|
scaleByDistance: NearFarScalar;
|
|
25276
25283
|
/**
|
|
25277
25284
|
* Gets or sets near and far translucency properties of a Billboard based on the billboard's distance from the camera.
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25285
|
+
* A billboard's translucency will interpolate between the {@link NearFarScalar#nearValue} and
|
|
25286
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25287
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25288
|
+
* Outside of these ranges the billboard's translucency remains clamped to the nearest bound. If undefined,
|
|
25289
|
+
* translucencyByDistance will be disabled.
|
|
25283
25290
|
* @example
|
|
25284
25291
|
* // Example 1.
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25292
|
+
* // Set a billboard's translucency to 1.0 when the
|
|
25293
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
25294
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
25295
|
+
* b.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
|
|
25289
25296
|
* @example
|
|
25290
25297
|
* // Example 2.
|
|
25291
|
-
|
|
25292
|
-
|
|
25298
|
+
* // disable translucency by distance
|
|
25299
|
+
* b.translucencyByDistance = undefined;
|
|
25293
25300
|
*/
|
|
25294
25301
|
translucencyByDistance: NearFarScalar;
|
|
25295
25302
|
/**
|
|
25296
25303
|
* Gets or sets near and far pixel offset scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25304
|
+
* A billboard's pixel offset will be scaled between the {@link NearFarScalar#nearValue} and
|
|
25305
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25306
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25307
|
+
* Outside of these ranges the billboard's pixel offset scale remains clamped to the nearest bound. If undefined,
|
|
25308
|
+
* pixelOffsetScaleByDistance will be disabled.
|
|
25302
25309
|
* @example
|
|
25303
25310
|
* // Example 1.
|
|
25304
|
-
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
|
|
25311
|
+
* // Set a billboard's pixel offset scale to 0.0 when the
|
|
25312
|
+
* // camera is 1500 meters from the billboard and scale pixel offset to 10.0 pixels
|
|
25313
|
+
* // in the y direction the camera distance approaches 8.0e6 meters.
|
|
25314
|
+
* b.pixelOffset = new Cesium.Cartesian2(0.0, 1.0);
|
|
25315
|
+
* b.pixelOffsetScaleByDistance = new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
|
|
25309
25316
|
* @example
|
|
25310
25317
|
* // Example 2.
|
|
25311
|
-
|
|
25312
|
-
|
|
25318
|
+
* // disable pixel offset by distance
|
|
25319
|
+
* b.pixelOffsetScaleByDistance = undefined;
|
|
25313
25320
|
*/
|
|
25314
25321
|
pixelOffsetScaleByDistance: NearFarScalar;
|
|
25315
25322
|
/**
|
|
25316
25323
|
* Gets or sets the 3D Cartesian offset applied to this billboard in eye coordinates. Eye coordinates is a left-handed
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25324
|
+
* coordinate system, where <code>x</code> points towards the viewer's right, <code>y</code> points up, and
|
|
25325
|
+
* <code>z</code> points into the screen. Eye coordinates use the same scale as world and model coordinates,
|
|
25326
|
+
* which is typically meters.
|
|
25327
|
+
* <br /><br />
|
|
25328
|
+
* An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to
|
|
25329
|
+
* arrange a billboard above its corresponding 3D model.
|
|
25330
|
+
* <br /><br />
|
|
25331
|
+
* Below, the billboard is positioned at the center of the Earth but an eye offset makes it always
|
|
25332
|
+
* appear on top of the Earth regardless of the viewer's or Earth's orientation.
|
|
25333
|
+
* <br /><br />
|
|
25334
|
+
* <div align='center'>
|
|
25335
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25336
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.one.png' width='250' height='188' /></td>
|
|
25337
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.two.png' width='250' height='188' /></td>
|
|
25338
|
+
* </tr></table>
|
|
25339
|
+
* <code>b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);</code><br /><br />
|
|
25340
|
+
* </div>
|
|
25334
25341
|
*/
|
|
25335
25342
|
eyeOffset: Cartesian3;
|
|
25336
25343
|
/**
|
|
25337
25344
|
* Gets or sets the horizontal origin of this billboard, which determines if the billboard is
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25345
|
+
* to the left, center, or right of its anchor position.
|
|
25346
|
+
* <br /><br />
|
|
25347
|
+
* <div align='center'>
|
|
25348
|
+
* <img src='Images/Billboard.setHorizontalOrigin.png' width='648' height='196' /><br />
|
|
25349
|
+
* </div>
|
|
25343
25350
|
* @example
|
|
25344
25351
|
* // Use a bottom, left origin
|
|
25345
|
-
|
|
25346
|
-
|
|
25352
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
25353
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
25347
25354
|
*/
|
|
25348
25355
|
horizontalOrigin: HorizontalOrigin;
|
|
25349
25356
|
/**
|
|
25350
25357
|
* Gets or sets the vertical origin of this billboard, which determines if the billboard is
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25355
|
-
|
|
25358
|
+
* to the above, below, or at the center of its anchor position.
|
|
25359
|
+
* <br /><br />
|
|
25360
|
+
* <div align='center'>
|
|
25361
|
+
* <img src='Images/Billboard.setVerticalOrigin.png' width='695' height='175' /><br />
|
|
25362
|
+
* </div>
|
|
25356
25363
|
* @example
|
|
25357
25364
|
* // Use a bottom, left origin
|
|
25358
|
-
|
|
25359
|
-
|
|
25365
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
25366
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
25360
25367
|
*/
|
|
25361
25368
|
verticalOrigin: VerticalOrigin;
|
|
25362
25369
|
/**
|
|
25363
25370
|
* Gets or sets the uniform scale that is multiplied with the billboard's image size in pixels.
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25371
|
+
* A scale of <code>1.0</code> does not change the size of the billboard; a scale greater than
|
|
25372
|
+
* <code>1.0</code> enlarges the billboard; a positive scale less than <code>1.0</code> shrinks
|
|
25373
|
+
* the billboard.
|
|
25374
|
+
* <br /><br />
|
|
25375
|
+
* <div align='center'>
|
|
25376
|
+
* <img src='Images/Billboard.setScale.png' width='400' height='300' /><br/>
|
|
25377
|
+
* From left to right in the above image, the scales are <code>0.5</code>, <code>1.0</code>,
|
|
25378
|
+
* and <code>2.0</code>.
|
|
25379
|
+
* </div>
|
|
25373
25380
|
*/
|
|
25374
25381
|
scale: number;
|
|
25375
25382
|
/**
|
|
25376
25383
|
* Gets or sets the color that is multiplied with the billboard's texture. This has two common use cases. First,
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25384
|
+
* the same white texture may be used by many different billboards, each with a different color, to create
|
|
25385
|
+
* colored billboards. Second, the color's alpha component can be used to make the billboard translucent as shown below.
|
|
25386
|
+
* An alpha of <code>0.0</code> makes the billboard transparent, and <code>1.0</code> makes the billboard opaque.
|
|
25387
|
+
* <br /><br />
|
|
25388
|
+
* <div align='center'>
|
|
25389
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25390
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setColor.Alpha255.png' width='250' height='188' /></td>
|
|
25391
|
+
* <td align='center'><code>alpha : 0.5</code><br/><img src='Images/Billboard.setColor.Alpha127.png' width='250' height='188' /></td>
|
|
25392
|
+
* </tr></table>
|
|
25393
|
+
* </div>
|
|
25394
|
+
* <br />
|
|
25395
|
+
* The red, green, blue, and alpha values are indicated by <code>value</code>'s <code>red</code>, <code>green</code>,
|
|
25396
|
+
* <code>blue</code>, and <code>alpha</code> properties as shown in Example 1. These components range from <code>0.0</code>
|
|
25397
|
+
* (no intensity) to <code>1.0</code> (full intensity).
|
|
25391
25398
|
* @example
|
|
25392
25399
|
* // Example 1. Assign yellow.
|
|
25393
|
-
|
|
25400
|
+
* b.color = Cesium.Color.YELLOW;
|
|
25394
25401
|
* @example
|
|
25395
25402
|
* // Example 2. Make a billboard 50% translucent.
|
|
25396
|
-
|
|
25403
|
+
* b.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
|
|
25397
25404
|
*/
|
|
25398
25405
|
color: Color;
|
|
25399
25406
|
/**
|
|
@@ -25402,20 +25409,20 @@ export class Billboard {
|
|
|
25402
25409
|
rotation: number;
|
|
25403
25410
|
/**
|
|
25404
25411
|
* Gets or sets the aligned axis in world space. The aligned axis is the unit vector that the billboard up vector points towards.
|
|
25405
|
-
|
|
25412
|
+
* The default is the zero vector, which means the billboard is aligned to the screen up vector.
|
|
25406
25413
|
* @example
|
|
25407
25414
|
* // Example 1.
|
|
25408
|
-
|
|
25409
|
-
|
|
25415
|
+
* // Have the billboard up vector point north
|
|
25416
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
25410
25417
|
* @example
|
|
25411
25418
|
* // Example 2.
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25419
|
+
* // Have the billboard point east.
|
|
25420
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
25421
|
+
* billboard.rotation = -Cesium.Math.PI_OVER_TWO;
|
|
25415
25422
|
* @example
|
|
25416
25423
|
* // Example 3.
|
|
25417
|
-
|
|
25418
|
-
|
|
25424
|
+
* // Reset the aligned axis
|
|
25425
|
+
* billboard.alignedAxis = Cesium.Cartesian3.ZERO;
|
|
25419
25426
|
*/
|
|
25420
25427
|
alignedAxis: Cartesian3;
|
|
25421
25428
|
/**
|
|
@@ -25428,7 +25435,7 @@ export class Billboard {
|
|
|
25428
25435
|
height: number;
|
|
25429
25436
|
/**
|
|
25430
25437
|
* Gets or sets if the billboard size is in meters or pixels. <code>true</code> to size the billboard in meters;
|
|
25431
|
-
|
|
25438
|
+
* otherwise, the size is in pixels.
|
|
25432
25439
|
*/
|
|
25433
25440
|
sizeInMeters: boolean;
|
|
25434
25441
|
/**
|
|
@@ -25437,7 +25444,7 @@ export class Billboard {
|
|
|
25437
25444
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
25438
25445
|
/**
|
|
25439
25446
|
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
25440
|
-
|
|
25447
|
+
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
|
|
25441
25448
|
*/
|
|
25442
25449
|
disableDepthTestDistance: number;
|
|
25443
25450
|
/**
|
|
@@ -25446,72 +25453,72 @@ export class Billboard {
|
|
|
25446
25453
|
id: any;
|
|
25447
25454
|
/**
|
|
25448
25455
|
* <p>
|
|
25449
|
-
|
|
25450
|
-
|
|
25451
|
-
|
|
25452
|
-
|
|
25453
|
-
|
|
25454
|
-
|
|
25455
|
-
|
|
25456
|
+
* Gets or sets the image to be used for this billboard. If a texture has already been created for the
|
|
25457
|
+
* given image, the existing texture is used.
|
|
25458
|
+
* </p>
|
|
25459
|
+
* <p>
|
|
25460
|
+
* This property can be set to a loaded Image, a URL which will be loaded as an Image automatically,
|
|
25461
|
+
* a canvas, or another billboard's image property (from the same billboard collection).
|
|
25462
|
+
* </p>
|
|
25456
25463
|
* @example
|
|
25457
25464
|
* // load an image from a URL
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25465
|
+
* b.image = 'some/image/url.png';
|
|
25466
|
+
*
|
|
25467
|
+
* // assuming b1 and b2 are billboards in the same billboard collection,
|
|
25468
|
+
* // use the same image for both billboards.
|
|
25469
|
+
* b2.image = b1.image;
|
|
25463
25470
|
*/
|
|
25464
25471
|
image: string;
|
|
25465
25472
|
/**
|
|
25466
25473
|
* When <code>true</code>, this billboard is ready to render, i.e., the image
|
|
25467
|
-
|
|
25474
|
+
* has been downloaded and the WebGL resources are created.
|
|
25468
25475
|
*/
|
|
25469
25476
|
readonly ready: boolean;
|
|
25470
25477
|
/**
|
|
25471
25478
|
* <p>
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25479
|
+
* Sets the image to be used for this billboard. If a texture has already been created for the
|
|
25480
|
+
* given id, the existing texture is used.
|
|
25481
|
+
* </p>
|
|
25482
|
+
* <p>
|
|
25483
|
+
* This function is useful for dynamically creating textures that are shared across many billboards.
|
|
25484
|
+
* Only the first billboard will actually call the function and create the texture, while subsequent
|
|
25485
|
+
* billboards created with the same id will simply re-use the existing texture.
|
|
25486
|
+
* </p>
|
|
25487
|
+
* <p>
|
|
25488
|
+
* To load an image from a URL, setting the {@link Billboard#image} property is more convenient.
|
|
25489
|
+
* </p>
|
|
25483
25490
|
* @example
|
|
25484
25491
|
* // create a billboard image dynamically
|
|
25485
|
-
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25492
|
+
* function drawImage(id) {
|
|
25493
|
+
* // create and draw an image using a canvas
|
|
25494
|
+
* const canvas = document.createElement('canvas');
|
|
25495
|
+
* const context2D = canvas.getContext('2d');
|
|
25496
|
+
* // ... draw image
|
|
25497
|
+
* return canvas;
|
|
25498
|
+
* }
|
|
25499
|
+
* // drawImage will be called to create the texture
|
|
25500
|
+
* b.setImage('myImage', drawImage);
|
|
25501
|
+
*
|
|
25502
|
+
* // subsequent billboards created in the same collection using the same id will use the existing
|
|
25503
|
+
* // texture, without the need to create the canvas or draw the image
|
|
25504
|
+
* b2.setImage('myImage', drawImage);
|
|
25498
25505
|
* @param id - The id of the image. This can be any string that uniquely identifies the image.
|
|
25499
25506
|
* @param image - The image to load. This parameter
|
|
25500
|
-
|
|
25501
|
-
|
|
25507
|
+
* can either be a loaded Image or Canvas, a URL which will be loaded as an Image automatically,
|
|
25508
|
+
* or a function which will be called to create the image if it hasn't been loaded already.
|
|
25502
25509
|
*/
|
|
25503
25510
|
setImage(id: string, image: HTMLImageElement | HTMLCanvasElement | string | Resource | Billboard.CreateImageCallback): void;
|
|
25504
25511
|
/**
|
|
25505
25512
|
* Uses a sub-region of the image with the given id as the image for this billboard,
|
|
25506
|
-
|
|
25513
|
+
* measured in pixels from the bottom-left.
|
|
25507
25514
|
* @param id - The id of the image to use.
|
|
25508
25515
|
* @param subRegion - The sub-region of the image.
|
|
25509
25516
|
*/
|
|
25510
25517
|
setImageSubRegion(id: string, subRegion: BoundingRectangle): void;
|
|
25511
25518
|
/**
|
|
25512
25519
|
* Computes the screen-space position of the billboard's origin, taking into account eye and pixel offsets.
|
|
25513
|
-
|
|
25514
|
-
|
|
25520
|
+
* The screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
25521
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
25515
25522
|
* @example
|
|
25516
25523
|
* console.log(b.computeScreenSpacePosition(scene).toString());
|
|
25517
25524
|
* @param scene - The scene.
|
|
@@ -25521,7 +25528,7 @@ export class Billboard {
|
|
|
25521
25528
|
computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2;
|
|
25522
25529
|
/**
|
|
25523
25530
|
* Determines if this billboard equals another billboard. Billboards are equal if all their properties
|
|
25524
|
-
|
|
25531
|
+
* are equal. Billboards in different collections can be equal.
|
|
25525
25532
|
* @param other - The billboard to compare for equality.
|
|
25526
25533
|
* @returns <code>true</code> if the billboards are equal; otherwise, <code>false</code>.
|
|
25527
25534
|
*/
|
|
@@ -27490,32 +27497,32 @@ export class Cesium3DTilePointFeature {
|
|
|
27490
27497
|
|
|
27491
27498
|
/**
|
|
27492
27499
|
* A {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
27493
|
-
|
|
27500
|
+
used for streaming massive heterogeneous 3D geospatial datasets.
|
|
27494
27501
|
* @example
|
|
27495
27502
|
* const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
27496
|
-
|
|
27497
|
-
|
|
27503
|
+
url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
|
|
27504
|
+
}));
|
|
27498
27505
|
* @example
|
|
27499
27506
|
* // Common setting for the skipLevelOfDetail optimization
|
|
27500
|
-
|
|
27501
|
-
|
|
27502
|
-
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27507
|
+
const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
27508
|
+
url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
|
|
27509
|
+
skipLevelOfDetail : true,
|
|
27510
|
+
baseScreenSpaceError : 1024,
|
|
27511
|
+
skipScreenSpaceErrorFactor : 16,
|
|
27512
|
+
skipLevels : 1,
|
|
27513
|
+
immediatelyLoadDesiredLevelOfDetail : false,
|
|
27514
|
+
loadSiblings : false,
|
|
27515
|
+
cullWithChildrenBounds : true
|
|
27516
|
+
}));
|
|
27510
27517
|
* @example
|
|
27511
27518
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
27512
|
-
|
|
27513
|
-
|
|
27514
|
-
|
|
27515
|
-
|
|
27516
|
-
|
|
27517
|
-
|
|
27518
|
-
|
|
27519
|
+
const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
27520
|
+
url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
|
|
27521
|
+
dynamicScreenSpaceError : true,
|
|
27522
|
+
dynamicScreenSpaceErrorDensity : 0.00278,
|
|
27523
|
+
dynamicScreenSpaceErrorFactor : 4.0,
|
|
27524
|
+
dynamicScreenSpaceErrorHeightFalloff : 0.25
|
|
27525
|
+
}));
|
|
27519
27526
|
* @param options - Object with the following properties:
|
|
27520
27527
|
* @param options.url - The url to a tileset JSON file.
|
|
27521
27528
|
* @param [options.show = true] - Determines if the tileset will be shown.
|
|
@@ -27661,68 +27668,68 @@ export class Cesium3DTileset {
|
|
|
27661
27668
|
preloadFlightDestinations: boolean;
|
|
27662
27669
|
/**
|
|
27663
27670
|
* Optimization option. Whether the tileset should refine based on a dynamic screen space error. Tiles that are further
|
|
27664
|
-
|
|
27665
|
-
|
|
27666
|
-
|
|
27667
|
-
|
|
27671
|
+
away will be rendered with lower detail than closer tiles. This improves performance by rendering fewer
|
|
27672
|
+
tiles and making less requests, but may result in a slight drop in visual quality for tiles in the distance.
|
|
27673
|
+
The algorithm is biased towards "street views" where the camera is close to the ground plane of the tileset and looking
|
|
27674
|
+
at the horizon. In addition results are more accurate for tightly fitting bounding volumes like box and region.
|
|
27668
27675
|
*/
|
|
27669
27676
|
dynamicScreenSpaceError: boolean;
|
|
27670
27677
|
/**
|
|
27671
27678
|
* Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
|
|
27672
|
-
|
|
27673
|
-
|
|
27679
|
+
screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
|
|
27680
|
+
the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
|
|
27674
27681
|
*/
|
|
27675
27682
|
foveatedScreenSpaceError: boolean;
|
|
27676
27683
|
/**
|
|
27677
27684
|
* Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
27678
|
-
|
|
27685
|
+
interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
27679
27686
|
*/
|
|
27680
27687
|
foveatedInterpolationCallback: Cesium3DTileset.foveatedInterpolationCallback;
|
|
27681
27688
|
/**
|
|
27682
27689
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27690
|
+
how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
|
|
27691
|
+
This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
|
|
27692
|
+
Setting this to 0.0 will immediately request all tiles in any given view.
|
|
27686
27693
|
*/
|
|
27687
27694
|
foveatedTimeDelay: number;
|
|
27688
27695
|
/**
|
|
27689
27696
|
* A scalar that determines the density used to adjust the dynamic screen space error, similar to {@link Fog}. Increasing this
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
|
|
27695
|
-
|
|
27696
|
-
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27697
|
+
value has the effect of increasing the maximum screen space error for all tiles, but in a non-linear fashion.
|
|
27698
|
+
The error starts at 0.0 and increases exponentially until a midpoint is reached, and then approaches 1.0 asymptotically.
|
|
27699
|
+
This has the effect of keeping high detail in the closer tiles and lower detail in the further tiles, with all tiles
|
|
27700
|
+
beyond a certain distance all roughly having an error of 1.0.
|
|
27701
|
+
<p>
|
|
27702
|
+
The dynamic error is in the range [0.0, 1.0) and is multiplied by <code>dynamicScreenSpaceErrorFactor</code> to produce the
|
|
27703
|
+
final dynamic error. This dynamic error is then subtracted from the tile's actual screen space error.
|
|
27704
|
+
</p>
|
|
27705
|
+
<p>
|
|
27706
|
+
Increasing <code>dynamicScreenSpaceErrorDensity</code> has the effect of moving the error midpoint closer to the camera.
|
|
27707
|
+
It is analogous to moving fog closer to the camera.
|
|
27708
|
+
</p>
|
|
27702
27709
|
*/
|
|
27703
27710
|
dynamicScreenSpaceErrorDensity: number;
|
|
27704
27711
|
/**
|
|
27705
27712
|
* A factor used to increase the screen space error of tiles for dynamic screen space error. As this value increases less tiles
|
|
27706
|
-
|
|
27713
|
+
are requested for rendering and tiles in the distance will have lower detail. If set to zero, the feature will be disabled.
|
|
27707
27714
|
*/
|
|
27708
27715
|
dynamicScreenSpaceErrorFactor: number;
|
|
27709
27716
|
/**
|
|
27710
27717
|
* A ratio of the tileset's height at which the density starts to falloff. If the camera is below this height the
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27718
|
+
full computed density is applied, otherwise the density falls off. This has the effect of higher density at
|
|
27719
|
+
street level views.
|
|
27720
|
+
<p>
|
|
27721
|
+
Valid values are between 0.0 and 1.0.
|
|
27722
|
+
</p>
|
|
27716
27723
|
*/
|
|
27717
27724
|
dynamicScreenSpaceErrorHeightFalloff: number;
|
|
27718
27725
|
/**
|
|
27719
27726
|
* Determines whether the tileset casts or receives shadows from light sources.
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
27724
|
-
|
|
27725
|
-
|
|
27727
|
+
<p>
|
|
27728
|
+
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.
|
|
27729
|
+
</p>
|
|
27730
|
+
<p>
|
|
27731
|
+
Shadows are rendered only when {@link Viewer#shadows} is <code>true</code>.
|
|
27732
|
+
</p>
|
|
27726
27733
|
*/
|
|
27727
27734
|
shadows: ShadowMode;
|
|
27728
27735
|
/**
|
|
@@ -27731,212 +27738,212 @@ export class Cesium3DTileset {
|
|
|
27731
27738
|
show: boolean;
|
|
27732
27739
|
/**
|
|
27733
27740
|
* Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
|
|
27734
|
-
|
|
27741
|
+
the original feature, e.g. glTF material or per-point color in the tile.
|
|
27735
27742
|
*/
|
|
27736
27743
|
colorBlendMode: Cesium3DTileColorBlendMode;
|
|
27737
27744
|
/**
|
|
27738
27745
|
* Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is <code>MIX</code>.
|
|
27739
|
-
|
|
27740
|
-
|
|
27746
|
+
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
|
|
27747
|
+
resulting in a mix of the source color and feature color.
|
|
27741
27748
|
*/
|
|
27742
27749
|
colorBlendAmount: number;
|
|
27743
27750
|
/**
|
|
27744
27751
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
27745
|
-
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27751
|
-
|
|
27752
|
-
|
|
27753
|
-
|
|
27752
|
+
is requested, when a requested tile is finished downloading, and when a downloaded tile has been
|
|
27753
|
+
processed and is ready to render.
|
|
27754
|
+
<p>
|
|
27755
|
+
The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
|
|
27756
|
+
processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
|
|
27757
|
+
</p>
|
|
27758
|
+
<p>
|
|
27759
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
27760
|
+
</p>
|
|
27754
27761
|
* @example
|
|
27755
27762
|
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
|
|
27759
|
-
|
|
27760
|
-
|
|
27761
|
-
|
|
27762
|
-
|
|
27763
|
+
if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
27764
|
+
console.log('Stopped loading');
|
|
27765
|
+
return;
|
|
27766
|
+
}
|
|
27767
|
+
|
|
27768
|
+
console.log('Loading: requests: ' + numberOfPendingRequests + ', processing: ' + numberOfTilesProcessing);
|
|
27769
|
+
});
|
|
27763
27770
|
*/
|
|
27764
27771
|
loadProgress: Event;
|
|
27765
27772
|
/**
|
|
27766
27773
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27774
|
+
is completely loaded for this view.
|
|
27775
|
+
<p>
|
|
27776
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
27777
|
+
</p>
|
|
27771
27778
|
* @example
|
|
27772
27779
|
* tileset.allTilesLoaded.addEventListener(function() {
|
|
27773
|
-
|
|
27774
|
-
|
|
27780
|
+
console.log('All tiles are loaded');
|
|
27781
|
+
});
|
|
27775
27782
|
*/
|
|
27776
27783
|
allTilesLoaded: Event;
|
|
27777
27784
|
/**
|
|
27778
27785
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27786
|
+
is fired once when all tiles in the initial view are loaded.
|
|
27787
|
+
<p>
|
|
27788
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
27789
|
+
</p>
|
|
27783
27790
|
* @example
|
|
27784
27791
|
* tileset.initialTilesLoaded.addEventListener(function() {
|
|
27785
|
-
|
|
27786
|
-
|
|
27792
|
+
console.log('Initial tiles are loaded');
|
|
27793
|
+
});
|
|
27787
27794
|
*/
|
|
27788
27795
|
initialTilesLoaded: Event;
|
|
27789
27796
|
/**
|
|
27790
27797
|
* The event fired to indicate that a tile's content was loaded.
|
|
27791
|
-
|
|
27792
|
-
|
|
27793
|
-
|
|
27794
|
-
|
|
27795
|
-
|
|
27796
|
-
|
|
27797
|
-
|
|
27798
|
-
|
|
27798
|
+
<p>
|
|
27799
|
+
The loaded {@link Cesium3DTile} is passed to the event listener.
|
|
27800
|
+
</p>
|
|
27801
|
+
<p>
|
|
27802
|
+
This event is fired during the tileset traversal while the frame is being rendered
|
|
27803
|
+
so that updates to the tile take effect in the same frame. Do not create or modify
|
|
27804
|
+
Cesium entities or primitives during the event listener.
|
|
27805
|
+
</p>
|
|
27799
27806
|
* @example
|
|
27800
27807
|
* tileset.tileLoad.addEventListener(function(tile) {
|
|
27801
|
-
|
|
27802
|
-
|
|
27808
|
+
console.log('A tile was loaded.');
|
|
27809
|
+
});
|
|
27803
27810
|
*/
|
|
27804
27811
|
tileLoad: Event;
|
|
27805
27812
|
/**
|
|
27806
27813
|
* The event fired to indicate that a tile's content was unloaded.
|
|
27807
|
-
|
|
27808
|
-
|
|
27809
|
-
|
|
27810
|
-
|
|
27811
|
-
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27814
|
+
<p>
|
|
27815
|
+
The unloaded {@link Cesium3DTile} is passed to the event listener.
|
|
27816
|
+
</p>
|
|
27817
|
+
<p>
|
|
27818
|
+
This event is fired immediately before the tile's content is unloaded while the frame is being
|
|
27819
|
+
rendered so that the event listener has access to the tile's content. Do not create
|
|
27820
|
+
or modify Cesium entities or primitives during the event listener.
|
|
27821
|
+
</p>
|
|
27815
27822
|
* @example
|
|
27816
27823
|
* tileset.tileUnload.addEventListener(function(tile) {
|
|
27817
|
-
|
|
27818
|
-
|
|
27824
|
+
console.log('A tile was unloaded from the cache.');
|
|
27825
|
+
});
|
|
27819
27826
|
*/
|
|
27820
27827
|
tileUnload: Event;
|
|
27821
27828
|
/**
|
|
27822
27829
|
* The event fired to indicate that a tile's content failed to load.
|
|
27823
|
-
|
|
27824
|
-
|
|
27825
|
-
|
|
27826
|
-
|
|
27827
|
-
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
|
|
27834
|
-
|
|
27830
|
+
<p>
|
|
27831
|
+
If there are no event listeners, error messages will be logged to the console.
|
|
27832
|
+
</p>
|
|
27833
|
+
<p>
|
|
27834
|
+
The error object passed to the listener contains two properties:
|
|
27835
|
+
<ul>
|
|
27836
|
+
<li><code>url</code>: the url of the failed tile.</li>
|
|
27837
|
+
<li><code>message</code>: the error message.</li>
|
|
27838
|
+
</ul>
|
|
27839
|
+
<p>
|
|
27840
|
+
If multiple contents are present, this event is raised once per inner content with errors.
|
|
27841
|
+
</p>
|
|
27835
27842
|
* @example
|
|
27836
27843
|
* tileset.tileFailed.addEventListener(function(error) {
|
|
27837
|
-
|
|
27838
|
-
|
|
27839
|
-
|
|
27844
|
+
console.log('An error occurred loading tile: ' + error.url);
|
|
27845
|
+
console.log('Error: ' + error.message);
|
|
27846
|
+
});
|
|
27840
27847
|
*/
|
|
27841
27848
|
tileFailed: Event;
|
|
27842
27849
|
/**
|
|
27843
27850
|
* This event fires once for each visible tile in a frame. This can be used to manually
|
|
27844
|
-
|
|
27845
|
-
|
|
27846
|
-
|
|
27847
|
-
|
|
27848
|
-
|
|
27849
|
-
|
|
27850
|
-
|
|
27851
|
-
|
|
27852
|
-
|
|
27851
|
+
style a tileset.
|
|
27852
|
+
<p>
|
|
27853
|
+
The visible {@link Cesium3DTile} is passed to the event listener.
|
|
27854
|
+
</p>
|
|
27855
|
+
<p>
|
|
27856
|
+
This event is fired during the tileset traversal while the frame is being rendered
|
|
27857
|
+
so that updates to the tile take effect in the same frame. Do not create or modify
|
|
27858
|
+
Cesium entities or primitives during the event listener.
|
|
27859
|
+
</p>
|
|
27853
27860
|
* @example
|
|
27854
27861
|
* tileset.tileVisible.addEventListener(function(tile) {
|
|
27855
|
-
|
|
27856
|
-
|
|
27857
|
-
|
|
27858
|
-
|
|
27862
|
+
if (tile.content instanceof Cesium.Batched3DModel3DTileContent) {
|
|
27863
|
+
console.log('A Batched 3D Model tile is visible.');
|
|
27864
|
+
}
|
|
27865
|
+
});
|
|
27859
27866
|
* @example
|
|
27860
27867
|
* // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
|
|
27861
|
-
|
|
27862
|
-
|
|
27863
|
-
|
|
27864
|
-
|
|
27865
|
-
|
|
27866
|
-
|
|
27867
|
-
|
|
27868
|
-
|
|
27869
|
-
|
|
27870
|
-
|
|
27868
|
+
tileset.style = new Cesium.Cesium3DTileStyle({
|
|
27869
|
+
color : 'color("red")'
|
|
27870
|
+
});
|
|
27871
|
+
tileset.tileVisible.addEventListener(function(tile) {
|
|
27872
|
+
const content = tile.content;
|
|
27873
|
+
const featuresLength = content.featuresLength;
|
|
27874
|
+
for (let i = 0; i < featuresLength; i+=2) {
|
|
27875
|
+
content.getFeature(i).color = Cesium.Color.fromRandom();
|
|
27876
|
+
}
|
|
27877
|
+
});
|
|
27871
27878
|
*/
|
|
27872
27879
|
tileVisible: Event;
|
|
27873
27880
|
/**
|
|
27874
27881
|
* Optimization option. Determines if level of detail skipping should be applied during the traversal.
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
|
|
27880
|
-
|
|
27882
|
+
<p>
|
|
27883
|
+
The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require
|
|
27884
|
+
all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped
|
|
27885
|
+
entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
|
|
27886
|
+
using this optimization.
|
|
27887
|
+
</p>
|
|
27881
27888
|
*/
|
|
27882
27889
|
skipLevelOfDetail: boolean;
|
|
27883
27890
|
/**
|
|
27884
27891
|
* The screen space error that must be reached before skipping levels of detail.
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
27892
|
+
<p>
|
|
27893
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27894
|
+
</p>
|
|
27888
27895
|
*/
|
|
27889
27896
|
baseScreenSpaceError: number;
|
|
27890
27897
|
/**
|
|
27891
27898
|
* Multiplier defining the minimum screen space error to skip.
|
|
27892
|
-
|
|
27893
|
-
|
|
27894
|
-
|
|
27895
|
-
|
|
27896
|
-
|
|
27899
|
+
For example, if a tile has screen space error of 100, no tiles will be loaded unless they
|
|
27900
|
+
are leaves or have a screen space error <code><= 100 / skipScreenSpaceErrorFactor</code>.
|
|
27901
|
+
<p>
|
|
27902
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27903
|
+
</p>
|
|
27897
27904
|
*/
|
|
27898
27905
|
skipScreenSpaceErrorFactor: number;
|
|
27899
27906
|
/**
|
|
27900
27907
|
* Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped.
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27908
|
+
For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.
|
|
27909
|
+
<p>
|
|
27910
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27911
|
+
</p>
|
|
27905
27912
|
*/
|
|
27906
27913
|
skipLevels: number;
|
|
27907
27914
|
/**
|
|
27908
27915
|
* When true, only tiles that meet the maximum screen space error will ever be downloaded.
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
27912
|
-
|
|
27916
|
+
Skipping factors are ignored and just the desired tiles are loaded.
|
|
27917
|
+
<p>
|
|
27918
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27919
|
+
</p>
|
|
27913
27920
|
*/
|
|
27914
27921
|
immediatelyLoadDesiredLevelOfDetail: boolean;
|
|
27915
27922
|
/**
|
|
27916
27923
|
* Determines whether siblings of visible tiles are always downloaded during traversal.
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27924
|
+
This may be useful for ensuring that tiles are already available when the viewer turns left/right.
|
|
27925
|
+
<p>
|
|
27926
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27927
|
+
</p>
|
|
27921
27928
|
*/
|
|
27922
27929
|
loadSiblings: boolean;
|
|
27923
27930
|
/**
|
|
27924
27931
|
* The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27932
|
+
<p>
|
|
27933
|
+
For example, disabling additional light sources by setting <code>model.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code> will make the
|
|
27934
|
+
model much darker. Here, increasing the intensity of the light source will make the model brighter.
|
|
27935
|
+
</p>
|
|
27929
27936
|
*/
|
|
27930
27937
|
lightColor: Cartesian3;
|
|
27931
27938
|
/**
|
|
27932
27939
|
* Whether to cull back-facing geometry. When true, back face culling is determined
|
|
27933
|
-
|
|
27940
|
+
by the glTF material's doubleSided property; when false, back face culling is disabled.
|
|
27934
27941
|
*/
|
|
27935
27942
|
backFaceCulling: boolean;
|
|
27936
27943
|
/**
|
|
27937
27944
|
* Whether to display the outline for models using the
|
|
27938
|
-
|
|
27939
|
-
|
|
27945
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
|
|
27946
|
+
When true, outlines are displayed. When false, outlines are not displayed.
|
|
27940
27947
|
*/
|
|
27941
27948
|
readonly showOutline: boolean;
|
|
27942
27949
|
/**
|
|
@@ -27945,79 +27952,79 @@ export class Cesium3DTileset {
|
|
|
27945
27952
|
splitDirection: SplitDirection;
|
|
27946
27953
|
/**
|
|
27947
27954
|
* This property is for debugging only; it is not optimized for production use.
|
|
27948
|
-
|
|
27949
|
-
|
|
27950
|
-
|
|
27951
|
-
|
|
27952
|
-
|
|
27955
|
+
<p>
|
|
27956
|
+
Determines if only the tiles from last frame should be used for rendering. This
|
|
27957
|
+
effectively "freezes" the tileset to the previous frame so it is possible to zoom
|
|
27958
|
+
out and see what was rendered.
|
|
27959
|
+
</p>
|
|
27953
27960
|
*/
|
|
27954
27961
|
debugFreezeFrame: boolean;
|
|
27955
27962
|
/**
|
|
27956
27963
|
* This property is for debugging only; it is not optimized for production use.
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27964
|
+
<p>
|
|
27965
|
+
When true, assigns a random color to each tile. This is useful for visualizing
|
|
27966
|
+
what features belong to what tiles, especially with additive refinement where features
|
|
27967
|
+
from parent tiles may be interleaved with features from child tiles.
|
|
27968
|
+
</p>
|
|
27962
27969
|
*/
|
|
27963
27970
|
debugColorizeTiles: boolean;
|
|
27964
27971
|
/**
|
|
27965
27972
|
* This property is for debugging only; it is not optimized for production use.
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
27973
|
+
<p>
|
|
27974
|
+
When true, renders each tile's content as a wireframe.
|
|
27975
|
+
</p>
|
|
27969
27976
|
*/
|
|
27970
27977
|
debugWireframe: boolean;
|
|
27971
27978
|
/**
|
|
27972
27979
|
* This property is for debugging only; it is not optimized for production use.
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27976
|
-
|
|
27977
|
-
|
|
27980
|
+
<p>
|
|
27981
|
+
When true, renders the bounding volume for each visible tile. The bounding volume is
|
|
27982
|
+
white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the
|
|
27983
|
+
screen space error and are still refining to their descendants are yellow.
|
|
27984
|
+
</p>
|
|
27978
27985
|
*/
|
|
27979
27986
|
debugShowBoundingVolume: boolean;
|
|
27980
27987
|
/**
|
|
27981
27988
|
* This property is for debugging only; it is not optimized for production use.
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27989
|
+
<p>
|
|
27990
|
+
When true, renders the bounding volume for each visible tile's content. The bounding volume is
|
|
27991
|
+
blue if the tile has a content bounding volume; otherwise it is red.
|
|
27992
|
+
</p>
|
|
27986
27993
|
*/
|
|
27987
27994
|
debugShowContentBoundingVolume: boolean;
|
|
27988
27995
|
/**
|
|
27989
27996
|
* This property is for debugging only; it is not optimized for production use.
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
27997
|
+
<p>
|
|
27998
|
+
When true, renders the viewer request volume for each tile.
|
|
27999
|
+
</p>
|
|
27993
28000
|
*/
|
|
27994
28001
|
debugShowViewerRequestVolume: boolean;
|
|
27995
28002
|
/**
|
|
27996
28003
|
* This property is for debugging only; it is not optimized for production use.
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28004
|
+
<p>
|
|
28005
|
+
When true, draws labels to indicate the geometric error of each tile.
|
|
28006
|
+
</p>
|
|
28000
28007
|
*/
|
|
28001
28008
|
debugShowGeometricError: boolean;
|
|
28002
28009
|
/**
|
|
28003
28010
|
* This property is for debugging only; it is not optimized for production use.
|
|
28004
|
-
|
|
28005
|
-
|
|
28006
|
-
|
|
28011
|
+
<p>
|
|
28012
|
+
When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
|
|
28013
|
+
</p>
|
|
28007
28014
|
*/
|
|
28008
28015
|
debugShowRenderingStatistics: boolean;
|
|
28009
28016
|
/**
|
|
28010
28017
|
* This property is for debugging only; it is not optimized for production use.
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28018
|
+
<p>
|
|
28019
|
+
When true, draws labels to indicate the geometry and texture memory usage of each tile.
|
|
28020
|
+
</p>
|
|
28014
28021
|
*/
|
|
28015
28022
|
debugShowMemoryUsage: boolean;
|
|
28016
28023
|
/**
|
|
28017
28024
|
* This property is for debugging only; it is not optimized for production use.
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28025
|
+
<p>
|
|
28026
|
+
When true, draws labels to indicate the url of each tile.
|
|
28027
|
+
</p>
|
|
28021
28028
|
*/
|
|
28022
28029
|
debugShowUrl: boolean;
|
|
28023
28030
|
/**
|
|
@@ -28026,10 +28033,10 @@ export class Cesium3DTileset {
|
|
|
28026
28033
|
examineVectorLinesFunction: (...params: any[]) => any;
|
|
28027
28034
|
/**
|
|
28028
28035
|
* Gets the tileset's asset object property, which contains metadata about the tileset.
|
|
28029
|
-
|
|
28030
|
-
|
|
28031
|
-
|
|
28032
|
-
|
|
28036
|
+
<p>
|
|
28037
|
+
See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference}
|
|
28038
|
+
in the 3D Tiles spec for the full set of properties.
|
|
28039
|
+
</p>
|
|
28033
28040
|
*/
|
|
28034
28041
|
readonly asset: any;
|
|
28035
28042
|
/**
|
|
@@ -28042,40 +28049,40 @@ export class Cesium3DTileset {
|
|
|
28042
28049
|
clippingPlanes: ClippingPlaneCollection;
|
|
28043
28050
|
/**
|
|
28044
28051
|
* Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
|
|
28052
|
+
<p>
|
|
28053
|
+
See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference}
|
|
28054
|
+
in the 3D Tiles spec for the full set of properties.
|
|
28055
|
+
</p>
|
|
28049
28056
|
* @example
|
|
28050
28057
|
* console.log('Maximum building height: ' + tileset.properties.height.maximum);
|
|
28051
|
-
|
|
28058
|
+
console.log('Minimum building height: ' + tileset.properties.height.minimum);
|
|
28052
28059
|
*/
|
|
28053
28060
|
readonly properties: any;
|
|
28054
28061
|
/**
|
|
28055
28062
|
* When <code>true</code>, the tileset's root tile is loaded and the tileset is ready to render.
|
|
28056
|
-
|
|
28063
|
+
This is set to <code>true</code> right before {@link Cesium3DTileset#readyPromise} is resolved.
|
|
28057
28064
|
*/
|
|
28058
28065
|
readonly ready: boolean;
|
|
28059
28066
|
/**
|
|
28060
28067
|
* Gets the promise that will be resolved when the tileset's root tile is loaded and the tileset is ready to render.
|
|
28061
|
-
|
|
28062
|
-
|
|
28063
|
-
|
|
28068
|
+
<p>
|
|
28069
|
+
This promise is resolved at the end of the frame before the first frame the tileset is rendered in.
|
|
28070
|
+
</p>
|
|
28064
28071
|
* @example
|
|
28065
28072
|
* tileset.readyPromise.then(function(tileset) {
|
|
28066
|
-
|
|
28067
|
-
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
|
|
28073
|
+
// tile.properties is not defined until readyPromise resolves.
|
|
28074
|
+
const properties = tileset.properties;
|
|
28075
|
+
if (Cesium.defined(properties)) {
|
|
28076
|
+
for (const name in properties) {
|
|
28077
|
+
console.log(properties[name]);
|
|
28078
|
+
}
|
|
28079
|
+
}
|
|
28080
|
+
});
|
|
28074
28081
|
*/
|
|
28075
28082
|
readonly readyPromise: Promise<Cesium3DTileset>;
|
|
28076
28083
|
/**
|
|
28077
28084
|
* When <code>true</code>, all tiles that meet the screen space error this frame are loaded. The tileset is
|
|
28078
|
-
|
|
28085
|
+
completely loaded for this view.
|
|
28079
28086
|
*/
|
|
28080
28087
|
readonly tilesLoaded: boolean;
|
|
28081
28088
|
/**
|
|
@@ -28088,82 +28095,82 @@ export class Cesium3DTileset {
|
|
|
28088
28095
|
readonly basePath: string;
|
|
28089
28096
|
/**
|
|
28090
28097
|
* The style, defined using the
|
|
28091
|
-
|
|
28092
|
-
|
|
28093
|
-
|
|
28094
|
-
|
|
28095
|
-
|
|
28096
|
-
|
|
28097
|
-
|
|
28098
|
-
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28098
|
+
{@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language},
|
|
28099
|
+
applied to each feature in the tileset.
|
|
28100
|
+
<p>
|
|
28101
|
+
Assign <code>undefined</code> to remove the style, which will restore the visual
|
|
28102
|
+
appearance of the tileset to its default when no style was applied.
|
|
28103
|
+
</p>
|
|
28104
|
+
<p>
|
|
28105
|
+
The style is applied to a tile before the {@link Cesium3DTileset#tileVisible}
|
|
28106
|
+
event is raised, so code in <code>tileVisible</code> can manually set a feature's
|
|
28107
|
+
properties (e.g. color and show) after the style is applied. When
|
|
28108
|
+
a new style is assigned any manually set properties are overwritten.
|
|
28109
|
+
</p>
|
|
28110
|
+
<p>
|
|
28111
|
+
Use an always "true" condition to specify the Color for all objects that are not
|
|
28112
|
+
overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White
|
|
28113
|
+
will be used. Similarly, use an always "true" condition to specify the show property
|
|
28114
|
+
for all objects that are not overridden by pre-existing conditions. Otherwise, the
|
|
28115
|
+
default show value true will be used.
|
|
28116
|
+
</p>
|
|
28110
28117
|
* @example
|
|
28111
28118
|
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
28112
|
-
|
|
28113
|
-
|
|
28114
|
-
|
|
28115
|
-
|
|
28116
|
-
|
|
28117
|
-
|
|
28118
|
-
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28119
|
+
color : {
|
|
28120
|
+
conditions : [
|
|
28121
|
+
['${Height} >= 100', 'color("purple", 0.5)'],
|
|
28122
|
+
['${Height} >= 50', 'color("red")'],
|
|
28123
|
+
['true', 'color("blue")']
|
|
28124
|
+
]
|
|
28125
|
+
},
|
|
28126
|
+
show : '${Height} > 0',
|
|
28127
|
+
meta : {
|
|
28128
|
+
description : '"Building id ${id} has height ${Height}."'
|
|
28129
|
+
}
|
|
28130
|
+
});
|
|
28124
28131
|
*/
|
|
28125
28132
|
style: Cesium3DTileStyle | undefined;
|
|
28126
28133
|
/**
|
|
28127
28134
|
* A custom shader to apply to all tiles in the tileset. Only used for
|
|
28128
|
-
|
|
28129
|
-
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28135
|
+
contents that use {@link ModelExperimental}. Using custom shaders with a
|
|
28136
|
+
{@link Cesium3DTileStyle} may lead to undefined behavior.
|
|
28137
|
+
<p>
|
|
28138
|
+
To enable {@link ModelExperimental}, set {@link ExperimentalFeatures.enableModelExperimental} or tileset.enableModelExperimental to <code>true</code>.
|
|
28139
|
+
</p>
|
|
28133
28140
|
*/
|
|
28134
28141
|
customShader: CustomShader | undefined;
|
|
28135
28142
|
/**
|
|
28136
28143
|
* The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
|
|
28142
|
-
|
|
28143
|
-
|
|
28144
|
-
|
|
28145
|
-
|
|
28146
|
-
|
|
28144
|
+
refines to its descendants, and therefore plays a major role in balancing performance with visual quality.
|
|
28145
|
+
<p>
|
|
28146
|
+
A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
|
|
28147
|
+
radius equal to the tile's <b>geometric error</b> were rendered at the tile's position. If this value exceeds
|
|
28148
|
+
<code>maximumScreenSpaceError</code> the tile refines to its descendants.
|
|
28149
|
+
</p>
|
|
28150
|
+
<p>
|
|
28151
|
+
Depending on the tileset, <code>maximumScreenSpaceError</code> may need to be tweaked to achieve the right balance.
|
|
28152
|
+
Higher values provide better performance but lower visual quality.
|
|
28153
|
+
</p>
|
|
28147
28154
|
*/
|
|
28148
28155
|
maximumScreenSpaceError: number;
|
|
28149
28156
|
/**
|
|
28150
28157
|
* The maximum amount of GPU memory (in MB) that may be used to cache tiles. This value is estimated from
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28156
|
-
|
|
28157
|
-
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28158
|
+
geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also
|
|
28159
|
+
includes per-point metadata.
|
|
28160
|
+
<p>
|
|
28161
|
+
Tiles not in view are unloaded to enforce this.
|
|
28162
|
+
</p>
|
|
28163
|
+
<p>
|
|
28164
|
+
If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
|
|
28165
|
+
</p>
|
|
28166
|
+
<p>
|
|
28167
|
+
If tiles sized more than <code>maximumMemoryUsage</code> are needed
|
|
28168
|
+
to meet the desired screen space error, determined by {@link Cesium3DTileset#maximumScreenSpaceError},
|
|
28169
|
+
for the current view, then the memory usage of the tiles loaded will exceed
|
|
28170
|
+
<code>maximumMemoryUsage</code>. For example, if the maximum is 256 MB, but
|
|
28171
|
+
300 MB of tiles are needed to meet the screen space error, then 300 MB of tiles may be loaded. When
|
|
28172
|
+
these tiles go out of view, they will be unloaded.
|
|
28173
|
+
</p>
|
|
28167
28174
|
*/
|
|
28168
28175
|
maximumMemoryUsage: number;
|
|
28169
28176
|
/**
|
|
@@ -28178,26 +28185,26 @@ export class Cesium3DTileset {
|
|
|
28178
28185
|
* The tileset's bounding sphere.
|
|
28179
28186
|
* @example
|
|
28180
28187
|
* const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
+
url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
|
|
28189
|
+
}));
|
|
28190
|
+
|
|
28191
|
+
tileset.readyPromise.then(function(tileset) {
|
|
28192
|
+
// Set the camera to view the newly added tileset
|
|
28193
|
+
viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
|
|
28194
|
+
});
|
|
28188
28195
|
*/
|
|
28189
28196
|
readonly boundingSphere: BoundingSphere;
|
|
28190
28197
|
/**
|
|
28191
28198
|
* A 4x4 transformation matrix that transforms the entire tileset.
|
|
28192
28199
|
* @example
|
|
28193
28200
|
* // Adjust a tileset's height from the globe's surface.
|
|
28194
|
-
|
|
28195
|
-
|
|
28196
|
-
|
|
28197
|
-
|
|
28198
|
-
|
|
28199
|
-
|
|
28200
|
-
|
|
28201
|
+
const heightOffset = 20.0;
|
|
28202
|
+
const boundingSphere = tileset.boundingSphere;
|
|
28203
|
+
const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
|
|
28204
|
+
const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
|
|
28205
|
+
const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
|
|
28206
|
+
const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
|
|
28207
|
+
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
|
|
28201
28208
|
*/
|
|
28202
28209
|
modelMatrix: Matrix4;
|
|
28203
28210
|
/**
|
|
@@ -28206,28 +28213,28 @@ export class Cesium3DTileset {
|
|
|
28206
28213
|
readonly timeSinceLoad: number;
|
|
28207
28214
|
/**
|
|
28208
28215
|
* The total amount of GPU memory in bytes used by the tileset. This value is estimated from
|
|
28209
|
-
|
|
28210
|
-
|
|
28216
|
+
geometry, texture, and batch table textures of loaded tiles. For point clouds, this value also
|
|
28217
|
+
includes per-point metadata.
|
|
28211
28218
|
*/
|
|
28212
28219
|
readonly totalMemoryUsageInBytes: number;
|
|
28213
28220
|
/**
|
|
28214
28221
|
* Determines whether terrain, 3D Tiles or both will be classified by this tileset.
|
|
28215
|
-
|
|
28216
|
-
|
|
28217
|
-
|
|
28218
|
-
|
|
28219
|
-
|
|
28220
|
-
|
|
28221
|
-
|
|
28222
|
-
|
|
28223
|
-
|
|
28224
|
-
|
|
28225
|
-
|
|
28226
|
-
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28222
|
+
<p>
|
|
28223
|
+
This option is only applied to tilesets containing batched 3D models, geometry data, or vector data. Even when undefined, vector data and geometry data
|
|
28224
|
+
must render as classifications and will default to rendering on both terrain and other 3D Tiles tilesets.
|
|
28225
|
+
</p>
|
|
28226
|
+
<p>
|
|
28227
|
+
When enabled for batched 3D model tilesets, there are a few requirements/limitations on the glTF:
|
|
28228
|
+
<ul>
|
|
28229
|
+
<li>POSITION and _BATCHID semantics are required.</li>
|
|
28230
|
+
<li>All indices with the same batch id must occupy contiguous sections of the index buffer.</li>
|
|
28231
|
+
<li>All shaders and techniques are ignored. The generated shader simply multiplies the position by the model-view-projection matrix.</li>
|
|
28232
|
+
<li>The only supported extensions are CESIUM_RTC and WEB3D_quantized_attributes.</li>
|
|
28233
|
+
<li>Only one node is supported.</li>
|
|
28234
|
+
<li>Only one mesh per node is supported.</li>
|
|
28235
|
+
<li>Only one primitive per mesh is supported.</li>
|
|
28236
|
+
</ul>
|
|
28237
|
+
</p>
|
|
28231
28238
|
*/
|
|
28232
28239
|
readonly classificationType: ClassificationType;
|
|
28233
28240
|
/**
|
|
@@ -28236,18 +28243,18 @@ export class Cesium3DTileset {
|
|
|
28236
28243
|
readonly ellipsoid: Ellipsoid;
|
|
28237
28244
|
/**
|
|
28238
28245
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
|
|
28239
|
-
|
|
28240
|
-
|
|
28246
|
+
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}.
|
|
28247
|
+
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.
|
|
28241
28248
|
*/
|
|
28242
28249
|
foveatedConeSize: number;
|
|
28243
28250
|
/**
|
|
28244
28251
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
|
|
28245
|
-
|
|
28252
|
+
The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
|
|
28246
28253
|
*/
|
|
28247
28254
|
foveatedMinimumScreenSpaceErrorRelaxation: number;
|
|
28248
28255
|
/**
|
|
28249
28256
|
* Returns the <code>extras</code> property at the top-level of the tileset JSON, which contains application specific metadata.
|
|
28250
|
-
|
|
28257
|
+
Returns <code>undefined</code> if <code>extras</code> does not exist.
|
|
28251
28258
|
*/
|
|
28252
28259
|
readonly extras: any;
|
|
28253
28260
|
/**
|
|
@@ -28256,25 +28263,25 @@ export class Cesium3DTileset {
|
|
|
28256
28263
|
imageBasedLighting: ImageBasedLighting;
|
|
28257
28264
|
/**
|
|
28258
28265
|
* Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
|
|
28259
|
-
|
|
28266
|
+
diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
|
|
28260
28267
|
*/
|
|
28261
28268
|
imageBasedLightingFactor: Cartesian2;
|
|
28262
28269
|
/**
|
|
28263
28270
|
* The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
|
|
28264
|
-
|
|
28271
|
+
This is used when {@link Cesium3DTileset#specularEnvironmentMaps} and {@link Cesium3DTileset#sphericalHarmonicCoefficients} are not defined.
|
|
28265
28272
|
*/
|
|
28266
28273
|
luminanceAtZenith: number;
|
|
28267
28274
|
/**
|
|
28268
28275
|
* The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
|
|
28269
|
-
|
|
28270
|
-
|
|
28271
|
-
|
|
28272
|
-
|
|
28273
|
-
|
|
28274
|
-
|
|
28275
|
-
|
|
28276
|
-
|
|
28277
|
-
|
|
28276
|
+
computed from the atmosphere color is used.
|
|
28277
|
+
<p>
|
|
28278
|
+
There are nine <code>Cartesian3</code> coefficients.
|
|
28279
|
+
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>
|
|
28280
|
+
</p>
|
|
28281
|
+
|
|
28282
|
+
These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
|
|
28283
|
+
{@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
|
|
28284
|
+
supplied to {@link Cesium3DTileset#specularEnvironmentMaps}.
|
|
28278
28285
|
*/
|
|
28279
28286
|
sphericalHarmonicCoefficients: Cartesian3[];
|
|
28280
28287
|
/**
|
|
@@ -28287,7 +28294,7 @@ export class Cesium3DTileset {
|
|
|
28287
28294
|
vectorClassificationOnly: boolean;
|
|
28288
28295
|
/**
|
|
28289
28296
|
* Whether vector tiles should keep decoded positions in memory.
|
|
28290
|
-
|
|
28297
|
+
This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
|
|
28291
28298
|
*/
|
|
28292
28299
|
vectorKeepDecodedPositions: boolean;
|
|
28293
28300
|
/**
|
|
@@ -28296,52 +28303,52 @@ export class Cesium3DTileset {
|
|
|
28296
28303
|
showCreditsOnScreen: boolean;
|
|
28297
28304
|
/**
|
|
28298
28305
|
* Label of the feature ID set to use for picking and styling.
|
|
28299
|
-
|
|
28300
|
-
|
|
28301
|
-
|
|
28302
|
-
|
|
28303
|
-
|
|
28304
|
-
|
|
28305
|
-
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
|
|
28311
|
-
|
|
28312
|
-
|
|
28306
|
+
<p>
|
|
28307
|
+
For EXT_mesh_features, this is the feature ID's label property, or
|
|
28308
|
+
"featureId_N" (where N is the index in the featureIds array) when not
|
|
28309
|
+
specified. EXT_feature_metadata did not have a label field, so such
|
|
28310
|
+
feature ID sets are always labeled "featureId_N" where N is the index in
|
|
28311
|
+
the list of all feature Ids, where feature ID attributes are listed before
|
|
28312
|
+
feature ID textures.
|
|
28313
|
+
</p>
|
|
28314
|
+
<p>
|
|
28315
|
+
If featureIdLabel is set to an integer N, it is converted to
|
|
28316
|
+
the string "featureId_N" automatically. If both per-primitive and
|
|
28317
|
+
per-instance feature IDs are present, the instance feature IDs take
|
|
28318
|
+
priority.
|
|
28319
|
+
</p>
|
|
28313
28320
|
*/
|
|
28314
28321
|
featureIdLabel: string;
|
|
28315
28322
|
/**
|
|
28316
28323
|
* Label of the instance feature ID set used for picking and styling.
|
|
28317
|
-
|
|
28318
|
-
|
|
28319
|
-
|
|
28320
|
-
|
|
28321
|
-
|
|
28322
|
-
|
|
28324
|
+
<p>
|
|
28325
|
+
If instanceFeatureIdLabel is set to an integer N, it is converted to
|
|
28326
|
+
the string "instanceFeatureId_N" automatically.
|
|
28327
|
+
If both per-primitive and per-instance feature IDs are present, the
|
|
28328
|
+
instance feature IDs take priority.
|
|
28329
|
+
</p>
|
|
28323
28330
|
*/
|
|
28324
28331
|
instanceFeatureIdLabel: string;
|
|
28325
28332
|
/**
|
|
28326
28333
|
* Provides a hook to override the method used to request the tileset json
|
|
28327
|
-
|
|
28334
|
+
useful when fetching tilesets from remote servers
|
|
28328
28335
|
* @param tilesetUrl - The url of the json file to be fetched
|
|
28329
28336
|
* @returns A promise that resolves with the fetched json data
|
|
28330
28337
|
*/
|
|
28331
28338
|
static loadJson(tilesetUrl: Resource | string): Promise<object>;
|
|
28332
28339
|
/**
|
|
28333
28340
|
* Marks the tileset's {@link Cesium3DTileset#style} as dirty, which forces all
|
|
28334
|
-
|
|
28341
|
+
features to re-evaluate the style in the next frame each is visible.
|
|
28335
28342
|
*/
|
|
28336
28343
|
makeStyleDirty(): void;
|
|
28337
28344
|
/**
|
|
28338
28345
|
* Unloads all tiles that weren't selected the previous frame. This can be used to
|
|
28339
|
-
|
|
28340
|
-
|
|
28341
|
-
|
|
28342
|
-
|
|
28343
|
-
|
|
28344
|
-
|
|
28346
|
+
explicitly manage the tile cache and reduce the total number of tiles loaded below
|
|
28347
|
+
{@link Cesium3DTileset#maximumMemoryUsage}.
|
|
28348
|
+
<p>
|
|
28349
|
+
Tile unloads occur at the next frame to keep all the WebGL delete calls
|
|
28350
|
+
within the render loop.
|
|
28351
|
+
</p>
|
|
28345
28352
|
*/
|
|
28346
28353
|
trimLoadedTiles(): void;
|
|
28347
28354
|
/**
|
|
@@ -28352,19 +28359,19 @@ export class Cesium3DTileset {
|
|
|
28352
28359
|
hasExtension(extensionName: string): boolean;
|
|
28353
28360
|
/**
|
|
28354
28361
|
* Returns true if this object was destroyed; otherwise, false.
|
|
28355
|
-
|
|
28356
|
-
|
|
28357
|
-
|
|
28362
|
+
<br /><br />
|
|
28363
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
28364
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
28358
28365
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
28359
28366
|
*/
|
|
28360
28367
|
isDestroyed(): boolean;
|
|
28361
28368
|
/**
|
|
28362
28369
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
28363
|
-
|
|
28364
|
-
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28370
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
28371
|
+
<br /><br />
|
|
28372
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
28373
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
28374
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
28368
28375
|
* @example
|
|
28369
28376
|
* tileset = tileset && tileset.destroy();
|
|
28370
28377
|
*/
|
|
@@ -28374,7 +28381,7 @@ export class Cesium3DTileset {
|
|
|
28374
28381
|
export namespace Cesium3DTileset {
|
|
28375
28382
|
/**
|
|
28376
28383
|
* 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,
|
|
28377
|
-
|
|
28384
|
+
interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
28378
28385
|
* @param p - The start value to interpolate.
|
|
28379
28386
|
* @param q - The end value to interpolate.
|
|
28380
28387
|
* @param time - The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
|
|
@@ -31144,8 +31151,8 @@ export namespace GoogleEarthEnterpriseImageryProvider {
|
|
|
31144
31151
|
* @property metadata - A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.
|
|
31145
31152
|
* @property [ellipsoid] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
31146
31153
|
* @property [tileDiscardPolicy] - The policy that determines if a tile
|
|
31147
|
-
|
|
31148
|
-
|
|
31154
|
+
* is invalid and should be discarded. If this value is not specified, a default
|
|
31155
|
+
* is to discard tiles that fail to download.
|
|
31149
31156
|
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
31150
31157
|
*/
|
|
31151
31158
|
type ConstructorOptions = {
|
|
@@ -31159,41 +31166,41 @@ export namespace GoogleEarthEnterpriseImageryProvider {
|
|
|
31159
31166
|
|
|
31160
31167
|
/**
|
|
31161
31168
|
* Provides tiled imagery using the Google Earth Enterprise REST API.
|
|
31162
|
-
|
|
31163
|
-
Notes: This provider is for use with the 3D Earth API of Google Earth Enterprise,
|
|
31164
|
-
|
|
31169
|
+
*
|
|
31170
|
+
* Notes: This provider is for use with the 3D Earth API of Google Earth Enterprise,
|
|
31171
|
+
* {@link GoogleEarthEnterpriseMapsProvider} should be used with 2D Maps API.
|
|
31165
31172
|
* @example
|
|
31166
31173
|
* const geeMetadata = new GoogleEarthEnterpriseMetadata('http://www.earthenterprise.org/3d');
|
|
31167
|
-
const gee = new Cesium.GoogleEarthEnterpriseImageryProvider({
|
|
31168
|
-
|
|
31169
|
-
});
|
|
31174
|
+
* const gee = new Cesium.GoogleEarthEnterpriseImageryProvider({
|
|
31175
|
+
* metadata : geeMetadata
|
|
31176
|
+
* });
|
|
31170
31177
|
* @param options - Object describing initialization options
|
|
31171
31178
|
*/
|
|
31172
31179
|
export class GoogleEarthEnterpriseImageryProvider {
|
|
31173
31180
|
constructor(options: GoogleEarthEnterpriseImageryProvider.ConstructorOptions);
|
|
31174
31181
|
/**
|
|
31175
31182
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
31176
|
-
|
|
31183
|
+
* 1.0 representing fully opaque.
|
|
31177
31184
|
*/
|
|
31178
31185
|
defaultAlpha: number | undefined;
|
|
31179
31186
|
/**
|
|
31180
31187
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31181
|
-
|
|
31188
|
+
* 1.0 representing fully opaque.
|
|
31182
31189
|
*/
|
|
31183
31190
|
defaultNightAlpha: number | undefined;
|
|
31184
31191
|
/**
|
|
31185
31192
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31186
|
-
|
|
31193
|
+
* 1.0 representing fully opaque.
|
|
31187
31194
|
*/
|
|
31188
31195
|
defaultDayAlpha: number | undefined;
|
|
31189
31196
|
/**
|
|
31190
31197
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
31191
|
-
|
|
31198
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
31192
31199
|
*/
|
|
31193
31200
|
defaultBrightness: number | undefined;
|
|
31194
31201
|
/**
|
|
31195
31202
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
31196
|
-
|
|
31203
|
+
* the contrast while greater than 1.0 increases it.
|
|
31197
31204
|
*/
|
|
31198
31205
|
defaultContrast: number | undefined;
|
|
31199
31206
|
/**
|
|
@@ -31202,7 +31209,7 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31202
31209
|
defaultHue: number | undefined;
|
|
31203
31210
|
/**
|
|
31204
31211
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
31205
|
-
|
|
31212
|
+
* saturation while greater than 1.0 increases it.
|
|
31206
31213
|
*/
|
|
31207
31214
|
defaultSaturation: number | undefined;
|
|
31208
31215
|
/**
|
|
@@ -31227,45 +31234,45 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31227
31234
|
readonly proxy: Proxy;
|
|
31228
31235
|
/**
|
|
31229
31236
|
* Gets the width of each tile, in pixels. This function should
|
|
31230
|
-
|
|
31237
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31231
31238
|
*/
|
|
31232
31239
|
readonly tileWidth: number;
|
|
31233
31240
|
/**
|
|
31234
31241
|
* Gets the height of each tile, in pixels. This function should
|
|
31235
|
-
|
|
31242
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31236
31243
|
*/
|
|
31237
31244
|
readonly tileHeight: number;
|
|
31238
31245
|
/**
|
|
31239
31246
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
31240
|
-
|
|
31247
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31241
31248
|
*/
|
|
31242
31249
|
readonly maximumLevel: number | undefined;
|
|
31243
31250
|
/**
|
|
31244
31251
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
31245
|
-
|
|
31252
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31246
31253
|
*/
|
|
31247
31254
|
readonly minimumLevel: number;
|
|
31248
31255
|
/**
|
|
31249
31256
|
* Gets the tiling scheme used by this provider. This function should
|
|
31250
|
-
|
|
31257
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31251
31258
|
*/
|
|
31252
31259
|
readonly tilingScheme: TilingScheme;
|
|
31253
31260
|
/**
|
|
31254
31261
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
31255
|
-
|
|
31262
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31256
31263
|
*/
|
|
31257
31264
|
readonly rectangle: Rectangle;
|
|
31258
31265
|
/**
|
|
31259
31266
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
31260
|
-
|
|
31261
|
-
|
|
31262
|
-
|
|
31267
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
31268
|
+
* returns undefined, no tiles are filtered. This function should
|
|
31269
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31263
31270
|
*/
|
|
31264
31271
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
31265
31272
|
/**
|
|
31266
31273
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
31267
|
-
|
|
31268
|
-
|
|
31274
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
31275
|
+
* are passed an instance of {@link TileProviderError}.
|
|
31269
31276
|
*/
|
|
31270
31277
|
readonly errorEvent: Event;
|
|
31271
31278
|
/**
|
|
@@ -31278,15 +31285,15 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31278
31285
|
readonly readyPromise: Promise<boolean>;
|
|
31279
31286
|
/**
|
|
31280
31287
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
31281
|
-
|
|
31288
|
+
* the source of the imagery. This function should not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31282
31289
|
*/
|
|
31283
31290
|
readonly credit: Credit;
|
|
31284
31291
|
/**
|
|
31285
31292
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
31286
|
-
|
|
31287
|
-
|
|
31288
|
-
|
|
31289
|
-
|
|
31293
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
31294
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
31295
|
+
* as if their alpha is 1.0 everywhere. Setting this property to false reduces memory usage
|
|
31296
|
+
* and texture upload time.
|
|
31290
31297
|
*/
|
|
31291
31298
|
readonly hasAlphaChannel: boolean;
|
|
31292
31299
|
/**
|
|
@@ -31299,29 +31306,29 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31299
31306
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
31300
31307
|
/**
|
|
31301
31308
|
* Requests the image for a given tile. This function should
|
|
31302
|
-
|
|
31309
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31303
31310
|
* @param x - The tile X coordinate.
|
|
31304
31311
|
* @param y - The tile Y coordinate.
|
|
31305
31312
|
* @param level - The tile level.
|
|
31306
31313
|
* @param [request] - The request object. Intended for internal use only.
|
|
31307
31314
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
31308
|
-
|
|
31309
|
-
|
|
31310
|
-
|
|
31315
|
+
* undefined if there are too many active requests to the server, and the request
|
|
31316
|
+
* should be retried later. The resolved image may be either an
|
|
31317
|
+
* Image or a Canvas DOM object.
|
|
31311
31318
|
*/
|
|
31312
31319
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
31313
31320
|
/**
|
|
31314
31321
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
31315
|
-
|
|
31322
|
+
* undefined.
|
|
31316
31323
|
* @param x - The tile X coordinate.
|
|
31317
31324
|
* @param y - The tile Y coordinate.
|
|
31318
31325
|
* @param level - The tile level.
|
|
31319
31326
|
* @param longitude - The longitude at which to pick features.
|
|
31320
31327
|
* @param latitude - The latitude at which to pick features.
|
|
31321
31328
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
31322
|
-
|
|
31323
|
-
|
|
31324
|
-
|
|
31329
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
31330
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
31331
|
+
* It may also be undefined if picking is not supported.
|
|
31325
31332
|
*/
|
|
31326
31333
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
31327
31334
|
}
|
|
@@ -31571,8 +31578,8 @@ export namespace GridImageryProvider {
|
|
|
31571
31578
|
* Initialization options for the GridImageryProvider constructor
|
|
31572
31579
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme for which to draw tiles.
|
|
31573
31580
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
31574
|
-
|
|
31575
|
-
|
|
31581
|
+
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
31582
|
+
* parameter is specified, the WGS84 ellipsoid is used.
|
|
31576
31583
|
* @property [cells = 8] - The number of grids cells.
|
|
31577
31584
|
* @property [color = Color(1.0, 1.0, 1.0, 0.4)] - The color to draw grid lines.
|
|
31578
31585
|
* @property [glowColor = Color(0.0, 1.0, 0.0, 0.05)] - The color to draw glow for grid lines.
|
|
@@ -31598,34 +31605,34 @@ export namespace GridImageryProvider {
|
|
|
31598
31605
|
|
|
31599
31606
|
/**
|
|
31600
31607
|
* An {@link ImageryProvider} that draws a wireframe grid on every tile with controllable background and glow.
|
|
31601
|
-
May be useful for custom rendering effects or debugging terrain.
|
|
31608
|
+
* May be useful for custom rendering effects or debugging terrain.
|
|
31602
31609
|
* @param options - Object describing initialization options
|
|
31603
31610
|
*/
|
|
31604
31611
|
export class GridImageryProvider {
|
|
31605
31612
|
constructor(options: GridImageryProvider.ConstructorOptions);
|
|
31606
31613
|
/**
|
|
31607
31614
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
31608
|
-
|
|
31615
|
+
* 1.0 representing fully opaque.
|
|
31609
31616
|
*/
|
|
31610
31617
|
defaultAlpha: number | undefined;
|
|
31611
31618
|
/**
|
|
31612
31619
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31613
|
-
|
|
31620
|
+
* 1.0 representing fully opaque.
|
|
31614
31621
|
*/
|
|
31615
31622
|
defaultNightAlpha: number | undefined;
|
|
31616
31623
|
/**
|
|
31617
31624
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31618
|
-
|
|
31625
|
+
* 1.0 representing fully opaque.
|
|
31619
31626
|
*/
|
|
31620
31627
|
defaultDayAlpha: number | undefined;
|
|
31621
31628
|
/**
|
|
31622
31629
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
31623
|
-
|
|
31630
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
31624
31631
|
*/
|
|
31625
31632
|
defaultBrightness: number | undefined;
|
|
31626
31633
|
/**
|
|
31627
31634
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
31628
|
-
|
|
31635
|
+
* the contrast while greater than 1.0 increases it.
|
|
31629
31636
|
*/
|
|
31630
31637
|
defaultContrast: number | undefined;
|
|
31631
31638
|
/**
|
|
@@ -31634,7 +31641,7 @@ export class GridImageryProvider {
|
|
|
31634
31641
|
defaultHue: number | undefined;
|
|
31635
31642
|
/**
|
|
31636
31643
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
31637
|
-
|
|
31644
|
+
* saturation while greater than 1.0 increases it.
|
|
31638
31645
|
*/
|
|
31639
31646
|
defaultSaturation: number | undefined;
|
|
31640
31647
|
/**
|
|
@@ -31655,45 +31662,45 @@ export class GridImageryProvider {
|
|
|
31655
31662
|
readonly proxy: Proxy;
|
|
31656
31663
|
/**
|
|
31657
31664
|
* Gets the width of each tile, in pixels. This function should
|
|
31658
|
-
|
|
31665
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31659
31666
|
*/
|
|
31660
31667
|
readonly tileWidth: number;
|
|
31661
31668
|
/**
|
|
31662
31669
|
* Gets the height of each tile, in pixels. This function should
|
|
31663
|
-
|
|
31670
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31664
31671
|
*/
|
|
31665
31672
|
readonly tileHeight: number;
|
|
31666
31673
|
/**
|
|
31667
31674
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
31668
|
-
|
|
31675
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31669
31676
|
*/
|
|
31670
31677
|
readonly maximumLevel: number | undefined;
|
|
31671
31678
|
/**
|
|
31672
31679
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
31673
|
-
|
|
31680
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31674
31681
|
*/
|
|
31675
31682
|
readonly minimumLevel: number;
|
|
31676
31683
|
/**
|
|
31677
31684
|
* Gets the tiling scheme used by this provider. This function should
|
|
31678
|
-
|
|
31685
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31679
31686
|
*/
|
|
31680
31687
|
readonly tilingScheme: TilingScheme;
|
|
31681
31688
|
/**
|
|
31682
31689
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
31683
|
-
|
|
31690
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31684
31691
|
*/
|
|
31685
31692
|
readonly rectangle: Rectangle;
|
|
31686
31693
|
/**
|
|
31687
31694
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31695
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
31696
|
+
* returns undefined, no tiles are filtered. This function should
|
|
31697
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31691
31698
|
*/
|
|
31692
31699
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
31693
31700
|
/**
|
|
31694
31701
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
31695
|
-
|
|
31696
|
-
|
|
31702
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
31703
|
+
* are passed an instance of {@link TileProviderError}.
|
|
31697
31704
|
*/
|
|
31698
31705
|
readonly errorEvent: Event;
|
|
31699
31706
|
/**
|
|
@@ -31706,15 +31713,15 @@ export class GridImageryProvider {
|
|
|
31706
31713
|
readonly readyPromise: Promise<boolean>;
|
|
31707
31714
|
/**
|
|
31708
31715
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
31709
|
-
|
|
31716
|
+
* the source of the imagery. This function should not be called before {@link GridImageryProvider#ready} returns true.
|
|
31710
31717
|
*/
|
|
31711
31718
|
readonly credit: Credit;
|
|
31712
31719
|
/**
|
|
31713
31720
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
|
|
31717
|
-
|
|
31721
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
31722
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
31723
|
+
* as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
31724
|
+
* and texture upload time are reduced.
|
|
31718
31725
|
*/
|
|
31719
31726
|
readonly hasAlphaChannel: boolean;
|
|
31720
31727
|
/**
|
|
@@ -31735,29 +31742,29 @@ export class GridImageryProvider {
|
|
|
31735
31742
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
31736
31743
|
/**
|
|
31737
31744
|
* Requests the image for a given tile. This function should
|
|
31738
|
-
|
|
31745
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31739
31746
|
* @param x - The tile X coordinate.
|
|
31740
31747
|
* @param y - The tile Y coordinate.
|
|
31741
31748
|
* @param level - The tile level.
|
|
31742
31749
|
* @param [request] - The request object. Intended for internal use only.
|
|
31743
31750
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
31744
|
-
|
|
31745
|
-
|
|
31746
|
-
|
|
31751
|
+
* undefined if there are too many active requests to the server, and the request
|
|
31752
|
+
* should be retried later. The resolved image may be either an
|
|
31753
|
+
* Image or a Canvas DOM object.
|
|
31747
31754
|
*/
|
|
31748
31755
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
31749
31756
|
/**
|
|
31750
31757
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
31751
|
-
|
|
31758
|
+
* undefined.
|
|
31752
31759
|
* @param x - The tile X coordinate.
|
|
31753
31760
|
* @param y - The tile Y coordinate.
|
|
31754
31761
|
* @param level - The tile level.
|
|
31755
31762
|
* @param longitude - The longitude at which to pick features.
|
|
31756
31763
|
* @param latitude - The latitude at which to pick features.
|
|
31757
31764
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31765
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
31766
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
31767
|
+
* It may also be undefined if picking is not supported.
|
|
31761
31768
|
*/
|
|
31762
31769
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
31763
31770
|
}
|
|
@@ -32277,85 +32284,85 @@ export class ImageBasedLighting {
|
|
|
32277
32284
|
|
|
32278
32285
|
/**
|
|
32279
32286
|
* An imagery layer that displays tiled image data from a single imagery provider
|
|
32280
|
-
|
|
32287
|
+
on a {@link Globe}.
|
|
32281
32288
|
* @param imageryProvider - The imagery provider to use.
|
|
32282
32289
|
* @param [options] - Object with the following properties:
|
|
32283
32290
|
* @param [options.rectangle = imageryProvider.rectangle] - The rectangle of the layer. This rectangle
|
|
32284
|
-
|
|
32291
|
+
can limit the visible portion of the imagery provider.
|
|
32285
32292
|
* @param [options.alpha = 1.0] - The alpha blending value of this layer, from 0.0 to 1.0.
|
|
32286
|
-
|
|
32287
|
-
|
|
32288
|
-
|
|
32289
|
-
|
|
32290
|
-
|
|
32293
|
+
This can either be a simple number or a function with the signature
|
|
32294
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32295
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32296
|
+
imagery tile for which the alpha is required, and it is expected to return
|
|
32297
|
+
the alpha value to use for the tile.
|
|
32291
32298
|
* @param [options.nightAlpha = 1.0] - The alpha blending value of this layer on the night side of the globe, from 0.0 to 1.0.
|
|
32292
|
-
|
|
32293
|
-
|
|
32294
|
-
|
|
32295
|
-
|
|
32296
|
-
|
|
32299
|
+
This can either be a simple number or a function with the signature
|
|
32300
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32301
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32302
|
+
imagery tile for which the alpha is required, and it is expected to return
|
|
32303
|
+
the alpha value to use for the tile. This only takes effect when <code>enableLighting</code> is <code>true</code>.
|
|
32297
32304
|
* @param [options.dayAlpha = 1.0] - The alpha blending value of this layer on the day side of the globe, from 0.0 to 1.0.
|
|
32298
|
-
|
|
32299
|
-
|
|
32300
|
-
|
|
32301
|
-
|
|
32302
|
-
|
|
32305
|
+
This can either be a simple number or a function with the signature
|
|
32306
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32307
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32308
|
+
imagery tile for which the alpha is required, and it is expected to return
|
|
32309
|
+
the alpha value to use for the tile. This only takes effect when <code>enableLighting</code> is <code>true</code>.
|
|
32303
32310
|
* @param [options.brightness = 1.0] - The brightness of this layer. 1.0 uses the unmodified imagery
|
|
32304
|
-
|
|
32305
|
-
|
|
32306
|
-
|
|
32307
|
-
|
|
32308
|
-
|
|
32309
|
-
|
|
32310
|
-
|
|
32311
|
+
color. Less than 1.0 makes the imagery darker while greater than 1.0 makes it brighter.
|
|
32312
|
+
This can either be a simple number or a function with the signature
|
|
32313
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32314
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32315
|
+
imagery tile for which the brightness is required, and it is expected to return
|
|
32316
|
+
the brightness value to use for the tile. The function is executed for every
|
|
32317
|
+
frame and for every tile, so it must be fast.
|
|
32311
32318
|
* @param [options.contrast = 1.0] - The contrast of this layer. 1.0 uses the unmodified imagery color.
|
|
32312
|
-
|
|
32313
|
-
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
32318
|
-
|
|
32319
|
+
Less than 1.0 reduces the contrast while greater than 1.0 increases it.
|
|
32320
|
+
This can either be a simple number or a function with the signature
|
|
32321
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32322
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32323
|
+
imagery tile for which the contrast is required, and it is expected to return
|
|
32324
|
+
the contrast value to use for the tile. The function is executed for every
|
|
32325
|
+
frame and for every tile, so it must be fast.
|
|
32319
32326
|
* @param [options.hue = 0.0] - The hue of this layer. 0.0 uses the unmodified imagery color.
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
32327
|
+
This can either be a simple number or a function with the signature
|
|
32328
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32329
|
+
current frame state, this layer, and the x, y, and level coordinates
|
|
32330
|
+
of the imagery tile for which the hue is required, and it is expected to return
|
|
32331
|
+
the contrast value to use for the tile. The function is executed for every
|
|
32332
|
+
frame and for every tile, so it must be fast.
|
|
32326
32333
|
* @param [options.saturation = 1.0] - The saturation of this layer. 1.0 uses the unmodified imagery color.
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
32333
|
-
|
|
32334
|
+
Less than 1.0 reduces the saturation while greater than 1.0 increases it.
|
|
32335
|
+
This can either be a simple number or a function with the signature
|
|
32336
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32337
|
+
current frame state, this layer, and the x, y, and level coordinates
|
|
32338
|
+
of the imagery tile for which the saturation is required, and it is expected to return
|
|
32339
|
+
the contrast value to use for the tile. The function is executed for every
|
|
32340
|
+
frame and for every tile, so it must be fast.
|
|
32334
32341
|
* @param [options.gamma = 1.0] - The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.
|
|
32335
|
-
|
|
32336
|
-
|
|
32337
|
-
|
|
32338
|
-
|
|
32339
|
-
|
|
32340
|
-
|
|
32342
|
+
This can either be a simple number or a function with the signature
|
|
32343
|
+
<code>function(frameState, layer, x, y, level)</code>. The function is passed the
|
|
32344
|
+
current frame state, this layer, and the x, y, and level coordinates of the
|
|
32345
|
+
imagery tile for which the gamma is required, and it is expected to return
|
|
32346
|
+
the gamma value to use for the tile. The function is executed for every
|
|
32347
|
+
frame and for every tile, so it must be fast.
|
|
32341
32348
|
* @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this layer.
|
|
32342
32349
|
* @param [options.minificationFilter = TextureMinificationFilter.LINEAR] - The
|
|
32343
|
-
|
|
32344
|
-
|
|
32345
|
-
|
|
32350
|
+
texture minification filter to apply to this layer. Possible values
|
|
32351
|
+
are <code>TextureMinificationFilter.LINEAR</code> and
|
|
32352
|
+
<code>TextureMinificationFilter.NEAREST</code>.
|
|
32346
32353
|
* @param [options.magnificationFilter = TextureMagnificationFilter.LINEAR] - The
|
|
32347
|
-
|
|
32348
|
-
|
|
32349
|
-
|
|
32354
|
+
texture minification filter to apply to this layer. Possible values
|
|
32355
|
+
are <code>TextureMagnificationFilter.LINEAR</code> and
|
|
32356
|
+
<code>TextureMagnificationFilter.NEAREST</code>.
|
|
32350
32357
|
* @param [options.show = true] - True if the layer is shown; otherwise, false.
|
|
32351
32358
|
* @param [options.maximumAnisotropy = maximum supported] - The maximum anisotropy level to use
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32359
|
+
for texture filtering. If this parameter is not specified, the maximum anisotropy supported
|
|
32360
|
+
by the WebGL stack will be used. Larger values make the imagery look better in horizon
|
|
32361
|
+
views.
|
|
32355
32362
|
* @param [options.minimumTerrainLevel] - The minimum terrain level-of-detail at which to show this imagery layer,
|
|
32356
|
-
|
|
32363
|
+
or undefined to show it at all levels. Level zero is the least-detailed level.
|
|
32357
32364
|
* @param [options.maximumTerrainLevel] - The maximum terrain level-of-detail at which to show this imagery layer,
|
|
32358
|
-
|
|
32365
|
+
or undefined to show it at all levels. Level zero is the least-detailed level.
|
|
32359
32366
|
* @param [options.cutoutRectangle] - Cartographic rectangle for cutting out a portion of this ImageryLayer.
|
|
32360
32367
|
* @param [options.colorToAlpha] - Color to be used as alpha.
|
|
32361
32368
|
* @param [options.colorToAlphaThreshold = 0.004] - Threshold for color-to-alpha.
|
|
@@ -32384,27 +32391,27 @@ export class ImageryLayer {
|
|
|
32384
32391
|
});
|
|
32385
32392
|
/**
|
|
32386
32393
|
* The alpha blending value of this layer, with 0.0 representing fully transparent and
|
|
32387
|
-
|
|
32394
|
+
1.0 representing fully opaque.
|
|
32388
32395
|
*/
|
|
32389
32396
|
alpha: number;
|
|
32390
32397
|
/**
|
|
32391
32398
|
* The alpha blending value of this layer on the night side of the globe, with 0.0 representing fully transparent and
|
|
32392
|
-
|
|
32399
|
+
1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is <code>true</code>.
|
|
32393
32400
|
*/
|
|
32394
32401
|
nightAlpha: number;
|
|
32395
32402
|
/**
|
|
32396
32403
|
* The alpha blending value of this layer on the day side of the globe, with 0.0 representing fully transparent and
|
|
32397
|
-
|
|
32404
|
+
1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is <code>true</code>.
|
|
32398
32405
|
*/
|
|
32399
32406
|
dayAlpha: number;
|
|
32400
32407
|
/**
|
|
32401
32408
|
* The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
32402
|
-
|
|
32409
|
+
makes the imagery darker while greater than 1.0 makes it brighter.
|
|
32403
32410
|
*/
|
|
32404
32411
|
brightness: number;
|
|
32405
32412
|
/**
|
|
32406
32413
|
* The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
32407
|
-
|
|
32414
|
+
the contrast while greater than 1.0 increases it.
|
|
32408
32415
|
*/
|
|
32409
32416
|
contrast: number;
|
|
32410
32417
|
/**
|
|
@@ -32413,7 +32420,7 @@ export class ImageryLayer {
|
|
|
32413
32420
|
hue: number;
|
|
32414
32421
|
/**
|
|
32415
32422
|
* The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
32416
|
-
|
|
32423
|
+
saturation while greater than 1.0 increases it.
|
|
32417
32424
|
*/
|
|
32418
32425
|
saturation: number;
|
|
32419
32426
|
/**
|
|
@@ -32426,20 +32433,20 @@ export class ImageryLayer {
|
|
|
32426
32433
|
splitDirection: SplitDirection;
|
|
32427
32434
|
/**
|
|
32428
32435
|
* The {@link TextureMinificationFilter} to apply to this layer.
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
|
|
32432
|
-
|
|
32433
|
-
|
|
32436
|
+
Possible values are {@link TextureMinificationFilter.LINEAR} (the default)
|
|
32437
|
+
and {@link TextureMinificationFilter.NEAREST}.
|
|
32438
|
+
|
|
32439
|
+
To take effect, this property must be set immediately after adding the imagery layer.
|
|
32440
|
+
Once a texture is loaded it won't be possible to change the texture filter used.
|
|
32434
32441
|
*/
|
|
32435
32442
|
minificationFilter: TextureMinificationFilter;
|
|
32436
32443
|
/**
|
|
32437
32444
|
* The {@link TextureMagnificationFilter} to apply to this layer.
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
|
|
32442
|
-
|
|
32445
|
+
Possible values are {@link TextureMagnificationFilter.LINEAR} (the default)
|
|
32446
|
+
and {@link TextureMagnificationFilter.NEAREST}.
|
|
32447
|
+
|
|
32448
|
+
To take effect, this property must be set immediately after adding the imagery layer.
|
|
32449
|
+
Once a texture is loaded it won't be possible to change the texture filter used.
|
|
32443
32450
|
*/
|
|
32444
32451
|
magnificationFilter: TextureMagnificationFilter;
|
|
32445
32452
|
/**
|
|
@@ -32464,92 +32471,92 @@ export class ImageryLayer {
|
|
|
32464
32471
|
readonly imageryProvider: ImageryProvider;
|
|
32465
32472
|
/**
|
|
32466
32473
|
* Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the
|
|
32467
|
-
|
|
32474
|
+
{@link ImageryProvider}, only a portion of the imagery provider is shown.
|
|
32468
32475
|
*/
|
|
32469
32476
|
readonly rectangle: Rectangle;
|
|
32470
32477
|
/**
|
|
32471
32478
|
* This value is used as the default brightness for the imagery layer if one is not provided during construction
|
|
32472
|
-
|
|
32479
|
+
or by the imagery provider. This value does not modify the brightness of the imagery.
|
|
32473
32480
|
*/
|
|
32474
32481
|
static DEFAULT_BRIGHTNESS: number;
|
|
32475
32482
|
/**
|
|
32476
32483
|
* This value is used as the default contrast for the imagery layer if one is not provided during construction
|
|
32477
|
-
|
|
32484
|
+
or by the imagery provider. This value does not modify the contrast of the imagery.
|
|
32478
32485
|
*/
|
|
32479
32486
|
static DEFAULT_CONTRAST: number;
|
|
32480
32487
|
/**
|
|
32481
32488
|
* This value is used as the default hue for the imagery layer if one is not provided during construction
|
|
32482
|
-
|
|
32489
|
+
or by the imagery provider. This value does not modify the hue of the imagery.
|
|
32483
32490
|
*/
|
|
32484
32491
|
static DEFAULT_HUE: number;
|
|
32485
32492
|
/**
|
|
32486
32493
|
* This value is used as the default saturation for the imagery layer if one is not provided during construction
|
|
32487
|
-
|
|
32494
|
+
or by the imagery provider. This value does not modify the saturation of the imagery.
|
|
32488
32495
|
*/
|
|
32489
32496
|
static DEFAULT_SATURATION: number;
|
|
32490
32497
|
/**
|
|
32491
32498
|
* This value is used as the default gamma for the imagery layer if one is not provided during construction
|
|
32492
|
-
|
|
32499
|
+
or by the imagery provider. This value does not modify the gamma of the imagery.
|
|
32493
32500
|
*/
|
|
32494
32501
|
static DEFAULT_GAMMA: number;
|
|
32495
32502
|
/**
|
|
32496
32503
|
* This value is used as the default split for the imagery layer if one is not provided during construction
|
|
32497
|
-
|
|
32504
|
+
or by the imagery provider.
|
|
32498
32505
|
*/
|
|
32499
32506
|
static DEFAULT_SPLIT: SplitDirection;
|
|
32500
32507
|
/**
|
|
32501
32508
|
* This value is used as the default texture minification filter for the imagery layer if one is not provided
|
|
32502
|
-
|
|
32509
|
+
during construction or by the imagery provider.
|
|
32503
32510
|
*/
|
|
32504
32511
|
static DEFAULT_MINIFICATION_FILTER: TextureMinificationFilter;
|
|
32505
32512
|
/**
|
|
32506
32513
|
* This value is used as the default texture magnification filter for the imagery layer if one is not provided
|
|
32507
|
-
|
|
32514
|
+
during construction or by the imagery provider.
|
|
32508
32515
|
*/
|
|
32509
32516
|
static DEFAULT_MAGNIFICATION_FILTER: TextureMagnificationFilter;
|
|
32510
32517
|
/**
|
|
32511
32518
|
* This value is used as the default threshold for color-to-alpha if one is not provided
|
|
32512
|
-
|
|
32519
|
+
during construction or by the imagery provider.
|
|
32513
32520
|
*/
|
|
32514
32521
|
static DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD: number;
|
|
32515
32522
|
/**
|
|
32516
32523
|
* Gets a value indicating whether this layer is the base layer in the
|
|
32517
|
-
|
|
32518
|
-
|
|
32519
|
-
|
|
32520
|
-
|
|
32524
|
+
{@link ImageryLayerCollection}. The base layer is the one that underlies all
|
|
32525
|
+
others. It is special in that it is treated as if it has global rectangle, even if
|
|
32526
|
+
it actually does not, by stretching the texels at the edges over the entire
|
|
32527
|
+
globe.
|
|
32521
32528
|
* @returns true if this is the base layer; otherwise, false.
|
|
32522
32529
|
*/
|
|
32523
32530
|
isBaseLayer(): boolean;
|
|
32524
32531
|
/**
|
|
32525
32532
|
* Returns true if this object was destroyed; otherwise, false.
|
|
32526
|
-
|
|
32527
|
-
|
|
32528
|
-
|
|
32533
|
+
<br /><br />
|
|
32534
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
32535
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
32529
32536
|
* @returns True if this object was destroyed; otherwise, false.
|
|
32530
32537
|
*/
|
|
32531
32538
|
isDestroyed(): boolean;
|
|
32532
32539
|
/**
|
|
32533
32540
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
32534
|
-
|
|
32535
|
-
|
|
32536
|
-
|
|
32537
|
-
|
|
32538
|
-
|
|
32541
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
32542
|
+
<br /><br />
|
|
32543
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
32544
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
32545
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
32539
32546
|
* @example
|
|
32540
32547
|
* imageryLayer = imageryLayer && imageryLayer.destroy();
|
|
32541
32548
|
*/
|
|
32542
32549
|
destroy(): void;
|
|
32543
32550
|
/**
|
|
32544
32551
|
* Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle,
|
|
32545
|
-
|
|
32552
|
+
producing the overall bounds of imagery that can be produced by this layer.
|
|
32546
32553
|
* @example
|
|
32547
32554
|
* // Zoom to an imagery layer.
|
|
32548
|
-
|
|
32549
|
-
|
|
32550
|
-
|
|
32551
|
-
|
|
32552
|
-
|
|
32555
|
+
imageryLayer.getViewableRectangle().then(function (rectangle) {
|
|
32556
|
+
return camera.flyTo({
|
|
32557
|
+
destination: rectangle
|
|
32558
|
+
});
|
|
32559
|
+
});
|
|
32553
32560
|
* @returns A promise to a rectangle which defines the overall bounds of imagery that can be produced by this layer.
|
|
32554
32561
|
*/
|
|
32555
32562
|
getViewableRectangle(): Promise<Rectangle>;
|
|
@@ -33396,33 +33403,33 @@ export class Label {
|
|
|
33396
33403
|
|
|
33397
33404
|
/**
|
|
33398
33405
|
* A renderable collection of labels. Labels are viewport-aligned text positioned in the 3D scene.
|
|
33399
|
-
Each label can have a different font, color, scale, etc.
|
|
33400
|
-
<br /><br />
|
|
33401
|
-
<div align='center'>
|
|
33402
|
-
<img src='Images/Label.png' width='400' height='300' /><br />
|
|
33403
|
-
Example labels
|
|
33404
|
-
</div>
|
|
33405
|
-
<br /><br />
|
|
33406
|
-
Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
33407
|
-
and {@link LabelCollection#remove}.
|
|
33406
|
+
* Each label can have a different font, color, scale, etc.
|
|
33407
|
+
* <br /><br />
|
|
33408
|
+
* <div align='center'>
|
|
33409
|
+
* <img src='Images/Label.png' width='400' height='300' /><br />
|
|
33410
|
+
* Example labels
|
|
33411
|
+
* </div>
|
|
33412
|
+
* <br /><br />
|
|
33413
|
+
* Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
33414
|
+
* and {@link LabelCollection#remove}.
|
|
33408
33415
|
* @example
|
|
33409
33416
|
* // Create a label collection with two labels
|
|
33410
|
-
const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
33411
|
-
labels.add({
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
});
|
|
33415
|
-
labels.add({
|
|
33416
|
-
|
|
33417
|
-
|
|
33418
|
-
});
|
|
33417
|
+
* const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
33418
|
+
* labels.add({
|
|
33419
|
+
* position : new Cesium.Cartesian3(1.0, 2.0, 3.0),
|
|
33420
|
+
* text : 'A label'
|
|
33421
|
+
* });
|
|
33422
|
+
* labels.add({
|
|
33423
|
+
* position : new Cesium.Cartesian3(4.0, 5.0, 6.0),
|
|
33424
|
+
* text : 'Another label'
|
|
33425
|
+
* });
|
|
33419
33426
|
* @param [options] - Object with the following properties:
|
|
33420
33427
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms each label from model to world coordinates.
|
|
33421
33428
|
* @param [options.debugShowBoundingVolume = false] - For debugging only. Determines if this primitive's commands' bounding spheres are shown.
|
|
33422
33429
|
* @param [options.scene] - Must be passed in for labels that use the height reference property or will be depth tested against the globe.
|
|
33423
33430
|
* @param [options.blendOption = BlendOption.OPAQUE_AND_TRANSLUCENT] - The label blending option. The default
|
|
33424
|
-
is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33425
|
-
setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
33431
|
+
* is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33432
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
33426
33433
|
* @param [options.show = true] - Determines if the labels in the collection will be shown.
|
|
33427
33434
|
*/
|
|
33428
33435
|
export class LabelCollection {
|
|
@@ -33439,85 +33446,85 @@ export class LabelCollection {
|
|
|
33439
33446
|
show: boolean;
|
|
33440
33447
|
/**
|
|
33441
33448
|
* The 4x4 transformation matrix that transforms each label in this collection from model to world coordinates.
|
|
33442
|
-
|
|
33443
|
-
|
|
33444
|
-
|
|
33449
|
+
* When this is the identity matrix, the labels are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
33450
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
33451
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
33445
33452
|
* @example
|
|
33446
33453
|
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
|
|
33447
|
-
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
|
|
33451
|
-
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33461
|
-
|
|
33462
|
-
|
|
33463
|
-
|
|
33454
|
+
* labels.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
|
|
33455
|
+
* labels.add({
|
|
33456
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 0.0),
|
|
33457
|
+
* text : 'Center'
|
|
33458
|
+
* });
|
|
33459
|
+
* labels.add({
|
|
33460
|
+
* position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0),
|
|
33461
|
+
* text : 'East'
|
|
33462
|
+
* });
|
|
33463
|
+
* labels.add({
|
|
33464
|
+
* position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0),
|
|
33465
|
+
* text : 'North'
|
|
33466
|
+
* });
|
|
33467
|
+
* labels.add({
|
|
33468
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0),
|
|
33469
|
+
* text : 'Up'
|
|
33470
|
+
* });
|
|
33464
33471
|
*/
|
|
33465
33472
|
modelMatrix: Matrix4;
|
|
33466
33473
|
/**
|
|
33467
33474
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
33468
|
-
|
|
33469
|
-
|
|
33470
|
-
|
|
33475
|
+
* <p>
|
|
33476
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
33477
|
+
* </p>
|
|
33471
33478
|
*/
|
|
33472
33479
|
debugShowBoundingVolume: boolean;
|
|
33473
33480
|
/**
|
|
33474
33481
|
* The label blending option. The default is used for rendering both opaque and translucent labels.
|
|
33475
|
-
|
|
33476
|
-
|
|
33477
|
-
|
|
33482
|
+
* However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33483
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve
|
|
33484
|
+
* performance by up to 2x.
|
|
33478
33485
|
*/
|
|
33479
33486
|
blendOption: BlendOption;
|
|
33480
33487
|
/**
|
|
33481
33488
|
* Returns the number of labels in this collection. This is commonly used with
|
|
33482
|
-
|
|
33483
|
-
|
|
33489
|
+
* {@link LabelCollection#get} to iterate over all the labels
|
|
33490
|
+
* in the collection.
|
|
33484
33491
|
*/
|
|
33485
33492
|
length: number;
|
|
33486
33493
|
/**
|
|
33487
33494
|
* Creates and adds a label with the specified initial properties to the collection.
|
|
33488
|
-
|
|
33495
|
+
* The added label is returned so it can be modified or removed from the collection later.
|
|
33489
33496
|
* @example
|
|
33490
33497
|
* // Example 1: Add a label, specifying all the default values.
|
|
33491
|
-
|
|
33492
|
-
|
|
33493
|
-
|
|
33494
|
-
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
|
|
33500
|
-
|
|
33501
|
-
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33506
|
-
|
|
33507
|
-
|
|
33508
|
-
|
|
33509
|
-
|
|
33510
|
-
|
|
33511
|
-
|
|
33512
|
-
|
|
33498
|
+
* const l = labels.add({
|
|
33499
|
+
* show : true,
|
|
33500
|
+
* position : Cesium.Cartesian3.ZERO,
|
|
33501
|
+
* text : '',
|
|
33502
|
+
* font : '30px sans-serif',
|
|
33503
|
+
* fillColor : Cesium.Color.WHITE,
|
|
33504
|
+
* outlineColor : Cesium.Color.BLACK,
|
|
33505
|
+
* outlineWidth : 1.0,
|
|
33506
|
+
* showBackground : false,
|
|
33507
|
+
* backgroundColor : new Cesium.Color(0.165, 0.165, 0.165, 0.8),
|
|
33508
|
+
* backgroundPadding : new Cesium.Cartesian2(7, 5),
|
|
33509
|
+
* style : Cesium.LabelStyle.FILL,
|
|
33510
|
+
* pixelOffset : Cesium.Cartesian2.ZERO,
|
|
33511
|
+
* eyeOffset : Cesium.Cartesian3.ZERO,
|
|
33512
|
+
* horizontalOrigin : Cesium.HorizontalOrigin.LEFT,
|
|
33513
|
+
* verticalOrigin : Cesium.VerticalOrigin.BASELINE,
|
|
33514
|
+
* scale : 1.0,
|
|
33515
|
+
* translucencyByDistance : undefined,
|
|
33516
|
+
* pixelOffsetScaleByDistance : undefined,
|
|
33517
|
+
* heightReference : HeightReference.NONE,
|
|
33518
|
+
* distanceDisplayCondition : undefined
|
|
33519
|
+
* });
|
|
33513
33520
|
* @example
|
|
33514
33521
|
* // Example 2: Specify only the label's cartographic position,
|
|
33515
|
-
|
|
33516
|
-
|
|
33517
|
-
|
|
33518
|
-
|
|
33519
|
-
|
|
33520
|
-
|
|
33522
|
+
* // text, and font.
|
|
33523
|
+
* const l = labels.add({
|
|
33524
|
+
* position : Cesium.Cartesian3.fromRadians(longitude, latitude, height),
|
|
33525
|
+
* text : 'Hello World',
|
|
33526
|
+
* font : '24px Helvetica',
|
|
33527
|
+
* });
|
|
33521
33528
|
* @param [options] - A template describing the label's properties as shown in Example 1.
|
|
33522
33529
|
* @returns The label that was added to the collection.
|
|
33523
33530
|
*/
|
|
@@ -33526,7 +33533,7 @@ export class LabelCollection {
|
|
|
33526
33533
|
* Removes a label from the collection. Once removed, a label is no longer usable.
|
|
33527
33534
|
* @example
|
|
33528
33535
|
* const l = labels.add(...);
|
|
33529
|
-
|
|
33536
|
+
* labels.remove(l); // Returns true
|
|
33530
33537
|
* @param label - The label to remove.
|
|
33531
33538
|
* @returns <code>true</code> if the label was removed; <code>false</code> if the label was not found in the collection.
|
|
33532
33539
|
*/
|
|
@@ -33535,8 +33542,8 @@ export class LabelCollection {
|
|
|
33535
33542
|
* Removes all labels from the collection.
|
|
33536
33543
|
* @example
|
|
33537
33544
|
* labels.add(...);
|
|
33538
|
-
|
|
33539
|
-
|
|
33545
|
+
* labels.add(...);
|
|
33546
|
+
* labels.removeAll();
|
|
33540
33547
|
*/
|
|
33541
33548
|
removeAll(): void;
|
|
33542
33549
|
/**
|
|
@@ -33547,36 +33554,36 @@ export class LabelCollection {
|
|
|
33547
33554
|
contains(label: Label): boolean;
|
|
33548
33555
|
/**
|
|
33549
33556
|
* Returns the label in the collection at the specified index. Indices are zero-based
|
|
33550
|
-
|
|
33551
|
-
|
|
33552
|
-
|
|
33553
|
-
|
|
33557
|
+
* and increase as labels are added. Removing a label shifts all labels after
|
|
33558
|
+
* it to the left, changing their indices. This function is commonly used with
|
|
33559
|
+
* {@link LabelCollection#length} to iterate over all the labels
|
|
33560
|
+
* in the collection.
|
|
33554
33561
|
* @example
|
|
33555
33562
|
* // Toggle the show property of every label in the collection
|
|
33556
|
-
|
|
33557
|
-
|
|
33558
|
-
|
|
33559
|
-
|
|
33560
|
-
|
|
33563
|
+
* const len = labels.length;
|
|
33564
|
+
* for (let i = 0; i < len; ++i) {
|
|
33565
|
+
* const l = billboards.get(i);
|
|
33566
|
+
* l.show = !l.show;
|
|
33567
|
+
* }
|
|
33561
33568
|
* @param index - The zero-based index of the billboard.
|
|
33562
33569
|
* @returns The label at the specified index.
|
|
33563
33570
|
*/
|
|
33564
33571
|
get(index: number): Label;
|
|
33565
33572
|
/**
|
|
33566
33573
|
* Returns true if this object was destroyed; otherwise, false.
|
|
33567
|
-
|
|
33568
|
-
|
|
33569
|
-
|
|
33574
|
+
* <br /><br />
|
|
33575
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
33576
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
33570
33577
|
* @returns True if this object was destroyed; otherwise, false.
|
|
33571
33578
|
*/
|
|
33572
33579
|
isDestroyed(): boolean;
|
|
33573
33580
|
/**
|
|
33574
33581
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
33575
|
-
|
|
33576
|
-
|
|
33577
|
-
|
|
33578
|
-
|
|
33579
|
-
|
|
33582
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
33583
|
+
* <br /><br />
|
|
33584
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
33585
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
33586
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
33580
33587
|
* @example
|
|
33581
33588
|
* labels = labels && labels.destroy();
|
|
33582
33589
|
*/
|
|
@@ -34573,56 +34580,56 @@ export namespace MaterialAppearance {
|
|
|
34573
34580
|
|
|
34574
34581
|
/**
|
|
34575
34582
|
* A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
34576
|
-
|
|
34577
|
-
|
|
34578
|
-
|
|
34579
|
-
|
|
34580
|
-
|
|
34581
|
-
|
|
34582
|
-
|
|
34583
|
-
|
|
34584
|
-
|
|
34585
|
-
|
|
34586
|
-
|
|
34587
|
-
|
|
34588
|
-
|
|
34589
|
-
|
|
34590
|
-
|
|
34591
|
-
|
|
34592
|
-
|
|
34593
|
-
|
|
34594
|
-
|
|
34595
|
-
|
|
34596
|
-
|
|
34597
|
-
|
|
34598
|
-
|
|
34599
|
-
|
|
34600
|
-
|
|
34601
|
-
|
|
34602
|
-
|
|
34603
|
-
|
|
34604
|
-
|
|
34605
|
-
|
|
34606
|
-
|
|
34607
|
-
|
|
34608
|
-
|
|
34609
|
-
|
|
34610
|
-
|
|
34611
|
-
|
|
34612
|
-
|
|
34613
|
-
|
|
34614
|
-
|
|
34615
|
-
|
|
34616
|
-
|
|
34617
|
-
|
|
34618
|
-
|
|
34619
|
-
|
|
34620
|
-
|
|
34621
|
-
|
|
34622
|
-
|
|
34623
|
-
|
|
34624
|
-
|
|
34625
|
-
|
|
34583
|
+
<p>
|
|
34584
|
+
Cesium includes support for geometry and materials, glTF animations, and glTF skinning.
|
|
34585
|
+
In addition, individual glTF nodes are pickable with {@link Scene#pick} and animatable
|
|
34586
|
+
with {@link Model#getNode}. glTF cameras and lights are not currently supported.
|
|
34587
|
+
</p>
|
|
34588
|
+
<p>
|
|
34589
|
+
An external glTF asset is created with {@link Model.fromGltf}. glTF JSON can also be
|
|
34590
|
+
created at runtime and passed to this constructor function. In either case, the
|
|
34591
|
+
{@link Model#readyPromise} is resolved when the model is ready to render, i.e.,
|
|
34592
|
+
when the external binary, image, and shader files are downloaded and the WebGL
|
|
34593
|
+
resources are created.
|
|
34594
|
+
</p>
|
|
34595
|
+
<p>
|
|
34596
|
+
Cesium supports glTF assets with the following extensions:
|
|
34597
|
+
<ul>
|
|
34598
|
+
<li>
|
|
34599
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
|
|
34600
|
+
</li><li>
|
|
34601
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
|
|
34602
|
+
</li><li>
|
|
34603
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
|
|
34604
|
+
</li><li>
|
|
34605
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
34606
|
+
</li><li>
|
|
34607
|
+
{@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
|
|
34608
|
+
</li><li>
|
|
34609
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
34610
|
+
</li><li>
|
|
34611
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
|
|
34612
|
+
</li><li>
|
|
34613
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
34614
|
+
</li><li>
|
|
34615
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
34616
|
+
</li><li>
|
|
34617
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
34618
|
+
</li><li>
|
|
34619
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
34620
|
+
</li>
|
|
34621
|
+
</ul>
|
|
34622
|
+
</p>
|
|
34623
|
+
<p>
|
|
34624
|
+
Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
|
|
34625
|
+
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})
|
|
34626
|
+
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}).
|
|
34627
|
+
</p>
|
|
34628
|
+
<p>
|
|
34629
|
+
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
|
|
34630
|
+
CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
|
|
34631
|
+
relative to a local origin.
|
|
34632
|
+
</p>
|
|
34626
34633
|
* @param [options] - Object with the following properties:
|
|
34627
34634
|
* @param [options.gltf] - A glTF JSON object, or a binary glTF buffer.
|
|
34628
34635
|
* @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
|
|
@@ -34714,30 +34721,30 @@ export class Model {
|
|
|
34714
34721
|
silhouetteSize: number;
|
|
34715
34722
|
/**
|
|
34716
34723
|
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
|
34717
|
-
|
|
34718
|
-
|
|
34719
|
-
|
|
34724
|
+
When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
34725
|
+
Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
34726
|
+
by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
34720
34727
|
* @example
|
|
34721
34728
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
34722
|
-
|
|
34729
|
+
m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
34723
34730
|
*/
|
|
34724
34731
|
modelMatrix: Matrix4;
|
|
34725
34732
|
/**
|
|
34726
34733
|
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
|
|
34727
|
-
|
|
34728
|
-
|
|
34734
|
+
Values greater than <code>1.0</code> increase the size of the model; values
|
|
34735
|
+
less than <code>1.0</code> decrease.
|
|
34729
34736
|
*/
|
|
34730
34737
|
scale: number;
|
|
34731
34738
|
/**
|
|
34732
34739
|
* The approximate minimum pixel size of the model regardless of zoom.
|
|
34733
|
-
|
|
34734
|
-
|
|
34740
|
+
This can be used to ensure that a model is visible even when the viewer
|
|
34741
|
+
zooms out. When <code>0.0</code>, no minimum size is enforced.
|
|
34735
34742
|
*/
|
|
34736
34743
|
minimumPixelSize: number;
|
|
34737
34744
|
/**
|
|
34738
34745
|
* The maximum scale size for a model. This can be used to give
|
|
34739
|
-
|
|
34740
|
-
|
|
34746
|
+
an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
|
|
34747
|
+
is never an unreasonable scale.
|
|
34741
34748
|
*/
|
|
34742
34749
|
maximumScale: number;
|
|
34743
34750
|
/**
|
|
@@ -34770,21 +34777,21 @@ export class Model {
|
|
|
34770
34777
|
colorBlendMode: ColorBlendMode;
|
|
34771
34778
|
/**
|
|
34772
34779
|
* Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>.
|
|
34773
|
-
|
|
34774
|
-
|
|
34780
|
+
A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with
|
|
34781
|
+
any value in-between resulting in a mix of the two.
|
|
34775
34782
|
*/
|
|
34776
34783
|
colorBlendAmount: number;
|
|
34777
34784
|
/**
|
|
34778
34785
|
* Whether to cull back-facing geometry. When true, back face culling is
|
|
34779
|
-
|
|
34780
|
-
|
|
34781
|
-
|
|
34786
|
+
determined by the material's doubleSided property; when false, back face
|
|
34787
|
+
culling is disabled. Back faces are not culled if {@link Model#color} is
|
|
34788
|
+
translucent or {@link Model#silhouetteSize} is greater than 0.0.
|
|
34782
34789
|
*/
|
|
34783
34790
|
backFaceCulling: boolean;
|
|
34784
34791
|
/**
|
|
34785
34792
|
* Whether to display the outline for models using the
|
|
34786
|
-
|
|
34787
|
-
|
|
34793
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
|
|
34794
|
+
When true, outlines are displayed. When false, outlines are not displayed.
|
|
34788
34795
|
*/
|
|
34789
34796
|
readonly showOutline: boolean;
|
|
34790
34797
|
/**
|
|
@@ -34793,66 +34800,66 @@ export class Model {
|
|
|
34793
34800
|
splitDirection: SplitDirection;
|
|
34794
34801
|
/**
|
|
34795
34802
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
34796
|
-
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34803
|
+
<p>
|
|
34804
|
+
Draws the bounding sphere for each draw command in the model. A glTF primitive corresponds
|
|
34805
|
+
to one draw command. A glTF mesh has an array of primitives, often of length one.
|
|
34806
|
+
</p>
|
|
34800
34807
|
*/
|
|
34801
34808
|
debugShowBoundingVolume: boolean;
|
|
34802
34809
|
/**
|
|
34803
34810
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
34804
|
-
|
|
34805
|
-
|
|
34806
|
-
|
|
34811
|
+
<p>
|
|
34812
|
+
Draws the model in wireframe.
|
|
34813
|
+
</p>
|
|
34807
34814
|
*/
|
|
34808
34815
|
debugWireframe: boolean;
|
|
34809
34816
|
/**
|
|
34810
34817
|
* The object for the glTF JSON, including properties with default values omitted
|
|
34811
|
-
|
|
34818
|
+
from the JSON provided to this model.
|
|
34812
34819
|
*/
|
|
34813
34820
|
readonly gltf: any;
|
|
34814
34821
|
/**
|
|
34815
34822
|
* The base path that paths in the glTF JSON are relative to. The base
|
|
34816
|
-
|
|
34817
|
-
|
|
34818
|
-
|
|
34819
|
-
|
|
34823
|
+
path is the same path as the path containing the .gltf file
|
|
34824
|
+
minus the .gltf file, when binary, image, and shader files are
|
|
34825
|
+
in the same directory as the .gltf. When this is <code>''</code>,
|
|
34826
|
+
the app's base path is used.
|
|
34820
34827
|
*/
|
|
34821
34828
|
readonly basePath: string;
|
|
34822
34829
|
/**
|
|
34823
34830
|
* The model's bounding sphere in its local coordinate system. This does not take into
|
|
34824
|
-
|
|
34831
|
+
account glTF animations and skins nor does it take into account {@link Model#minimumPixelSize}.
|
|
34825
34832
|
* @example
|
|
34826
34833
|
* // Center in WGS84 coordinates
|
|
34827
|
-
|
|
34834
|
+
const center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
|
|
34828
34835
|
*/
|
|
34829
34836
|
readonly boundingSphere: BoundingSphere;
|
|
34830
34837
|
/**
|
|
34831
34838
|
* When <code>true</code>, this model is ready to render, i.e., the external binary, image,
|
|
34832
|
-
|
|
34833
|
-
|
|
34839
|
+
and shader files were downloaded and the WebGL resources were created. This is set to
|
|
34840
|
+
<code>true</code> right before {@link Model#readyPromise} is resolved.
|
|
34834
34841
|
*/
|
|
34835
34842
|
readonly ready: boolean;
|
|
34836
34843
|
/**
|
|
34837
34844
|
* Gets the promise that will be resolved when this model is ready to render, i.e., when the external binary, image,
|
|
34838
|
-
|
|
34839
|
-
|
|
34840
|
-
|
|
34841
|
-
|
|
34845
|
+
and shader files were downloaded and the WebGL resources were created.
|
|
34846
|
+
<p>
|
|
34847
|
+
This promise is resolved at the end of the frame before the first frame the model is rendered in.
|
|
34848
|
+
</p>
|
|
34842
34849
|
* @example
|
|
34843
34850
|
* // Play all animations at half-speed when the model is ready to render
|
|
34844
|
-
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
34849
|
-
|
|
34850
|
-
|
|
34851
|
+
Promise.resolve(model.readyPromise).then(function(model) {
|
|
34852
|
+
model.activeAnimations.addAll({
|
|
34853
|
+
multiplier : 0.5
|
|
34854
|
+
});
|
|
34855
|
+
}).catch(function(error){
|
|
34856
|
+
window.alert(error);
|
|
34857
|
+
});
|
|
34851
34858
|
*/
|
|
34852
34859
|
readonly readyPromise: Promise<Model>;
|
|
34853
34860
|
/**
|
|
34854
34861
|
* Determines if model WebGL resource creation will be spread out over several frames or
|
|
34855
|
-
|
|
34862
|
+
block until completion once all glTF files are loaded.
|
|
34856
34863
|
*/
|
|
34857
34864
|
readonly asynchronous: boolean;
|
|
34858
34865
|
/**
|
|
@@ -34877,10 +34884,10 @@ export class Model {
|
|
|
34877
34884
|
clippingPlanes: ClippingPlaneCollection;
|
|
34878
34885
|
/**
|
|
34879
34886
|
* The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
|
34880
|
-
|
|
34881
|
-
|
|
34882
|
-
|
|
34883
|
-
|
|
34887
|
+
<p>
|
|
34888
|
+
For example, disabling additional light sources by setting <code>model.imageBasedLightingFactor = new Cesium.Cartesian2(0.0, 0.0)</code> will make the
|
|
34889
|
+
model much darker. Here, increasing the intensity of the light source will make the model brighter.
|
|
34890
|
+
</p>
|
|
34884
34891
|
*/
|
|
34885
34892
|
lightColor: Cartesian3;
|
|
34886
34893
|
/**
|
|
@@ -34889,25 +34896,25 @@ export class Model {
|
|
|
34889
34896
|
imageBasedLighting: ImageBasedLighting;
|
|
34890
34897
|
/**
|
|
34891
34898
|
* Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
|
|
34892
|
-
|
|
34899
|
+
diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
|
|
34893
34900
|
*/
|
|
34894
34901
|
imageBasedLightingFactor: Cartesian2;
|
|
34895
34902
|
/**
|
|
34896
34903
|
* The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
|
|
34897
|
-
|
|
34904
|
+
This is used when {@link Model#specularEnvironmentMaps} and {@link Model#sphericalHarmonicCoefficients} are not defined.
|
|
34898
34905
|
*/
|
|
34899
34906
|
luminanceAtZenith: number;
|
|
34900
34907
|
/**
|
|
34901
34908
|
* The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
|
|
34902
|
-
|
|
34903
|
-
|
|
34904
|
-
|
|
34905
|
-
|
|
34906
|
-
|
|
34907
|
-
|
|
34908
|
-
|
|
34909
|
-
|
|
34910
|
-
|
|
34909
|
+
computed from the atmosphere color is used.
|
|
34910
|
+
<p>
|
|
34911
|
+
There are nine <code>Cartesian3</code> coefficients.
|
|
34912
|
+
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>
|
|
34913
|
+
</p>
|
|
34914
|
+
|
|
34915
|
+
These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
|
|
34916
|
+
{@link https://github.com/google/filament/releases|Google's Filament project}. This will also generate a KTX file that can be
|
|
34917
|
+
supplied to {@link Model#specularEnvironmentMaps}.
|
|
34911
34918
|
*/
|
|
34912
34919
|
sphericalHarmonicCoefficients: Cartesian3[];
|
|
34913
34920
|
/**
|
|
@@ -34930,71 +34937,71 @@ export class Model {
|
|
|
34930
34937
|
static silhouetteSupported(scene: Scene): boolean;
|
|
34931
34938
|
/**
|
|
34932
34939
|
* <p>
|
|
34933
|
-
|
|
34934
|
-
|
|
34935
|
-
|
|
34936
|
-
|
|
34937
|
-
|
|
34938
|
-
|
|
34939
|
-
|
|
34940
|
-
|
|
34941
|
-
|
|
34942
|
-
|
|
34943
|
-
|
|
34944
|
-
|
|
34945
|
-
|
|
34946
|
-
|
|
34947
|
-
|
|
34948
|
-
|
|
34949
|
-
|
|
34950
|
-
|
|
34951
|
-
|
|
34952
|
-
|
|
34953
|
-
|
|
34954
|
-
|
|
34955
|
-
|
|
34956
|
-
|
|
34957
|
-
|
|
34958
|
-
|
|
34959
|
-
|
|
34960
|
-
|
|
34961
|
-
|
|
34962
|
-
|
|
34963
|
-
|
|
34964
|
-
|
|
34965
|
-
|
|
34966
|
-
|
|
34967
|
-
|
|
34968
|
-
|
|
34969
|
-
|
|
34970
|
-
|
|
34971
|
-
|
|
34940
|
+
Creates a model from a glTF asset. When the model is ready to render, i.e., when the external binary, image,
|
|
34941
|
+
and shader files are downloaded and the WebGL resources are created, the {@link Model#readyPromise} is resolved.
|
|
34942
|
+
</p>
|
|
34943
|
+
<p>
|
|
34944
|
+
The model can be a traditional glTF asset with a .gltf extension or a Binary glTF using the .glb extension.
|
|
34945
|
+
</p>
|
|
34946
|
+
<p>
|
|
34947
|
+
Cesium supports glTF assets with the following extensions:
|
|
34948
|
+
<ul>
|
|
34949
|
+
<li>
|
|
34950
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
|
|
34951
|
+
</li><li>
|
|
34952
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
|
|
34953
|
+
</li><li>
|
|
34954
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
|
|
34955
|
+
</li><li>
|
|
34956
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
34957
|
+
</li><li>
|
|
34958
|
+
{@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
|
|
34959
|
+
</li><li>
|
|
34960
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
34961
|
+
</li><li>
|
|
34962
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
|
|
34963
|
+
</li><li>
|
|
34964
|
+
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
34965
|
+
</li><li>
|
|
34966
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
34967
|
+
</li><li>
|
|
34968
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
34969
|
+
</li><li>
|
|
34970
|
+
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md|KHR_texture_basisu}
|
|
34971
|
+
</li>
|
|
34972
|
+
</ul>
|
|
34973
|
+
</p>
|
|
34974
|
+
<p>
|
|
34975
|
+
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
|
|
34976
|
+
CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
|
|
34977
|
+
relative to a local origin.
|
|
34978
|
+
</p>
|
|
34972
34979
|
* @example
|
|
34973
34980
|
* // Example 1. Create a model from a glTF asset
|
|
34974
|
-
|
|
34975
|
-
|
|
34976
|
-
|
|
34981
|
+
const model = scene.primitives.add(Cesium.Model.fromGltf({
|
|
34982
|
+
url : './duck/duck.gltf'
|
|
34983
|
+
}));
|
|
34977
34984
|
* @example
|
|
34978
34985
|
* // Example 2. Create model and provide all properties and events
|
|
34979
|
-
|
|
34980
|
-
|
|
34981
|
-
|
|
34982
|
-
|
|
34983
|
-
|
|
34984
|
-
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34992
|
-
|
|
34993
|
-
|
|
34994
|
-
|
|
34995
|
-
|
|
34996
|
-
|
|
34997
|
-
|
|
34986
|
+
const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
34987
|
+
const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
34988
|
+
|
|
34989
|
+
const model = scene.primitives.add(Cesium.Model.fromGltf({
|
|
34990
|
+
url : './duck/duck.gltf',
|
|
34991
|
+
show : true, // default
|
|
34992
|
+
modelMatrix : modelMatrix,
|
|
34993
|
+
scale : 2.0, // double size
|
|
34994
|
+
minimumPixelSize : 128, // never smaller than 128 pixels
|
|
34995
|
+
maximumScale: 20000, // never larger than 20000 * model size (overrides minimumPixelSize)
|
|
34996
|
+
allowPicking : false, // not pickable
|
|
34997
|
+
debugShowBoundingVolume : false, // default
|
|
34998
|
+
debugWireframe : false
|
|
34999
|
+
}));
|
|
35000
|
+
|
|
35001
|
+
model.readyPromise.then(function(model) {
|
|
35002
|
+
// Play all animations when the model is ready to render
|
|
35003
|
+
model.activeAnimations.addAll();
|
|
35004
|
+
});
|
|
34998
35005
|
* @param options - Object with the following properties:
|
|
34999
35006
|
* @param options.url - The url to the .gltf file.
|
|
35000
35007
|
* @param [options.basePath] - The base path that paths in the glTF JSON are relative to.
|
|
@@ -35072,11 +35079,11 @@ export class Model {
|
|
|
35072
35079
|
}): Model;
|
|
35073
35080
|
/**
|
|
35074
35081
|
* Returns the glTF node with the given <code>name</code> property. This is used to
|
|
35075
|
-
|
|
35082
|
+
modify a node's transform for animation outside of glTF animations.
|
|
35076
35083
|
* @example
|
|
35077
35084
|
* // Apply non-uniform scale to node LOD3sp
|
|
35078
|
-
|
|
35079
|
-
|
|
35085
|
+
const node = model.getNode('LOD3sp');
|
|
35086
|
+
node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
|
|
35080
35087
|
* @param name - The glTF name of the node.
|
|
35081
35088
|
* @returns The node or <code>undefined</code> if no node with <code>name</code> exists.
|
|
35082
35089
|
*/
|
|
@@ -35095,40 +35102,40 @@ export class Model {
|
|
|
35095
35102
|
getMaterial(name: string): ModelMaterial;
|
|
35096
35103
|
/**
|
|
35097
35104
|
* Sets the current value of an articulation stage. After setting one or multiple stage values, call
|
|
35098
|
-
|
|
35105
|
+
Model.applyArticulations() to cause the node matrices to be recalculated.
|
|
35099
35106
|
* @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
|
|
35100
35107
|
* @param value - The numeric value of this stage of the articulation.
|
|
35101
35108
|
*/
|
|
35102
35109
|
setArticulationStage(articulationStageKey: string, value: number): void;
|
|
35103
35110
|
/**
|
|
35104
35111
|
* Applies any modified articulation stages to the matrix of each node that participates
|
|
35105
|
-
|
|
35112
|
+
in any articulation. Note that this will overwrite any nodeTransformations on participating nodes.
|
|
35106
35113
|
*/
|
|
35107
35114
|
applyArticulations(): void;
|
|
35108
35115
|
/**
|
|
35109
35116
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
|
|
35114
|
-
|
|
35117
|
+
get the draw commands needed to render this primitive.
|
|
35118
|
+
<p>
|
|
35119
|
+
Do not call this function directly. This is documented just to
|
|
35120
|
+
list the exceptions that may be propagated when the scene is rendered:
|
|
35121
|
+
</p>
|
|
35115
35122
|
*/
|
|
35116
35123
|
update(): void;
|
|
35117
35124
|
/**
|
|
35118
35125
|
* Returns true if this object was destroyed; otherwise, false.
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35126
|
+
<br /><br />
|
|
35127
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
35128
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
35122
35129
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
35123
35130
|
*/
|
|
35124
35131
|
isDestroyed(): boolean;
|
|
35125
35132
|
/**
|
|
35126
35133
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
35127
|
-
|
|
35128
|
-
|
|
35129
|
-
|
|
35130
|
-
|
|
35131
|
-
|
|
35134
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
35135
|
+
<br /><br />
|
|
35136
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
35137
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
35138
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
35132
35139
|
* @example
|
|
35133
35140
|
* model = model && model.destroy();
|
|
35134
35141
|
*/
|
|
@@ -38223,88 +38230,88 @@ export enum PostProcessStageSampleMode {
|
|
|
38223
38230
|
|
|
38224
38231
|
/**
|
|
38225
38232
|
* A primitive represents geometry in the {@link Scene}. The geometry can be from a single {@link GeometryInstance}
|
|
38226
|
-
as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
38227
|
-
geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
38228
|
-
<p>
|
|
38229
|
-
A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
38230
|
-
{@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
38231
|
-
and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
38232
|
-
and match most of them and add a new geometry or appearance independently of each other.
|
|
38233
|
-
</p>
|
|
38234
|
-
<p>
|
|
38235
|
-
Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
38236
|
-
Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
38237
|
-
per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
38238
|
-
</p>
|
|
38239
|
-
<p>
|
|
38240
|
-
{@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
38241
|
-
show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
38242
|
-
shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
38243
|
-
</p>
|
|
38233
|
+
* as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
38234
|
+
* geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
38235
|
+
* <p>
|
|
38236
|
+
* A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
38237
|
+
* {@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
38238
|
+
* and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
38239
|
+
* and match most of them and add a new geometry or appearance independently of each other.
|
|
38240
|
+
* </p>
|
|
38241
|
+
* <p>
|
|
38242
|
+
* Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
38243
|
+
* Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
38244
|
+
* per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
38245
|
+
* </p>
|
|
38246
|
+
* <p>
|
|
38247
|
+
* {@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
38248
|
+
* show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
38249
|
+
* shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
38250
|
+
* </p>
|
|
38244
38251
|
* @example
|
|
38245
38252
|
* // 1. Draw a translucent ellipse on the surface with a checkerboard pattern
|
|
38246
|
-
const instance = new Cesium.GeometryInstance({
|
|
38247
|
-
|
|
38248
|
-
|
|
38249
|
-
|
|
38250
|
-
|
|
38251
|
-
|
|
38252
|
-
|
|
38253
|
-
|
|
38254
|
-
|
|
38255
|
-
});
|
|
38256
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38257
|
-
|
|
38258
|
-
|
|
38259
|
-
|
|
38260
|
-
|
|
38261
|
-
}));
|
|
38253
|
+
* const instance = new Cesium.GeometryInstance({
|
|
38254
|
+
* geometry : new Cesium.EllipseGeometry({
|
|
38255
|
+
* center : Cesium.Cartesian3.fromDegrees(-100.0, 20.0),
|
|
38256
|
+
* semiMinorAxis : 500000.0,
|
|
38257
|
+
* semiMajorAxis : 1000000.0,
|
|
38258
|
+
* rotation : Cesium.Math.PI_OVER_FOUR,
|
|
38259
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_ST
|
|
38260
|
+
* }),
|
|
38261
|
+
* id : 'object returned when this instance is picked and to get/set per-instance attributes'
|
|
38262
|
+
* });
|
|
38263
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38264
|
+
* geometryInstances : instance,
|
|
38265
|
+
* appearance : new Cesium.EllipsoidSurfaceAppearance({
|
|
38266
|
+
* material : Cesium.Material.fromType('Checkerboard')
|
|
38267
|
+
* })
|
|
38268
|
+
* }));
|
|
38262
38269
|
* @example
|
|
38263
38270
|
* // 2. Draw different instances each with a unique color
|
|
38264
|
-
const rectangleInstance = new Cesium.GeometryInstance({
|
|
38265
|
-
|
|
38266
|
-
|
|
38267
|
-
|
|
38268
|
-
|
|
38269
|
-
|
|
38270
|
-
|
|
38271
|
-
|
|
38272
|
-
|
|
38273
|
-
});
|
|
38274
|
-
const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
38275
|
-
|
|
38276
|
-
|
|
38277
|
-
|
|
38278
|
-
|
|
38279
|
-
|
|
38280
|
-
|
|
38281
|
-
|
|
38282
|
-
|
|
38283
|
-
|
|
38284
|
-
|
|
38285
|
-
});
|
|
38286
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38287
|
-
|
|
38288
|
-
|
|
38289
|
-
}));
|
|
38271
|
+
* const rectangleInstance = new Cesium.GeometryInstance({
|
|
38272
|
+
* geometry : new Cesium.RectangleGeometry({
|
|
38273
|
+
* rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0),
|
|
38274
|
+
* vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
|
|
38275
|
+
* }),
|
|
38276
|
+
* id : 'rectangle',
|
|
38277
|
+
* attributes : {
|
|
38278
|
+
* color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
|
|
38279
|
+
* }
|
|
38280
|
+
* });
|
|
38281
|
+
* const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
38282
|
+
* geometry : new Cesium.EllipsoidGeometry({
|
|
38283
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
38284
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
38285
|
+
* }),
|
|
38286
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
38287
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
38288
|
+
* id : 'ellipsoid',
|
|
38289
|
+
* attributes : {
|
|
38290
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
38291
|
+
* }
|
|
38292
|
+
* });
|
|
38293
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38294
|
+
* geometryInstances : [rectangleInstance, ellipsoidInstance],
|
|
38295
|
+
* appearance : new Cesium.PerInstanceColorAppearance()
|
|
38296
|
+
* }));
|
|
38290
38297
|
* @example
|
|
38291
38298
|
* // 3. Create the geometry on the main thread.
|
|
38292
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38293
|
-
|
|
38294
|
-
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
38298
|
-
|
|
38299
|
-
|
|
38300
|
-
|
|
38301
|
-
|
|
38302
|
-
|
|
38303
|
-
|
|
38304
|
-
|
|
38305
|
-
|
|
38306
|
-
|
|
38307
|
-
}));
|
|
38299
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38300
|
+
* geometryInstances : new Cesium.GeometryInstance({
|
|
38301
|
+
* geometry : Cesium.EllipsoidGeometry.createGeometry(new Cesium.EllipsoidGeometry({
|
|
38302
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
38303
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
38304
|
+
* })),
|
|
38305
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
38306
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
38307
|
+
* id : 'ellipsoid',
|
|
38308
|
+
* attributes : {
|
|
38309
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
38310
|
+
* }
|
|
38311
|
+
* }),
|
|
38312
|
+
* appearance : new Cesium.PerInstanceColorAppearance(),
|
|
38313
|
+
* asynchronous : false
|
|
38314
|
+
* }));
|
|
38308
38315
|
* @param [options] - Object with the following properties:
|
|
38309
38316
|
* @param [options.geometryInstances] - The geometry instances - or a single geometry instance - to render.
|
|
38310
38317
|
* @param [options.appearance] - The appearance used to render the primitive.
|
|
@@ -38340,67 +38347,67 @@ export class Primitive {
|
|
|
38340
38347
|
});
|
|
38341
38348
|
/**
|
|
38342
38349
|
* The geometry instances rendered with this primitive. This may
|
|
38343
|
-
|
|
38344
|
-
|
|
38345
|
-
|
|
38346
|
-
|
|
38347
|
-
|
|
38350
|
+
* be <code>undefined</code> if <code>options.releaseGeometryInstances</code>
|
|
38351
|
+
* is <code>true</code> when the primitive is constructed.
|
|
38352
|
+
* <p>
|
|
38353
|
+
* Changing this property after the primitive is rendered has no effect.
|
|
38354
|
+
* </p>
|
|
38348
38355
|
*/
|
|
38349
38356
|
readonly geometryInstances: GeometryInstance[] | GeometryInstance;
|
|
38350
38357
|
/**
|
|
38351
38358
|
* The {@link Appearance} used to shade this primitive. Each geometry
|
|
38352
|
-
|
|
38353
|
-
|
|
38354
|
-
|
|
38359
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
38360
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
38361
|
+
* properties.
|
|
38355
38362
|
*/
|
|
38356
38363
|
appearance: Appearance;
|
|
38357
38364
|
/**
|
|
38358
38365
|
* The {@link Appearance} used to shade this primitive when it fails the depth test. Each geometry
|
|
38359
|
-
|
|
38360
|
-
|
|
38361
|
-
|
|
38362
|
-
|
|
38363
|
-
|
|
38364
|
-
|
|
38365
|
-
|
|
38366
|
-
|
|
38367
|
-
|
|
38368
|
-
|
|
38369
|
-
|
|
38370
|
-
|
|
38371
|
-
|
|
38366
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
38367
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
38368
|
+
* properties.
|
|
38369
|
+
*
|
|
38370
|
+
* <p>
|
|
38371
|
+
* When using an appearance that requires a color attribute, like PerInstanceColorAppearance,
|
|
38372
|
+
* add a depthFailColor per-instance attribute instead.
|
|
38373
|
+
* </p>
|
|
38374
|
+
*
|
|
38375
|
+
* <p>
|
|
38376
|
+
* Requires the EXT_frag_depth WebGL extension to render properly. If the extension is not supported,
|
|
38377
|
+
* there may be artifacts.
|
|
38378
|
+
* </p>
|
|
38372
38379
|
*/
|
|
38373
38380
|
depthFailAppearance: Appearance;
|
|
38374
38381
|
/**
|
|
38375
38382
|
* The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
|
|
38376
|
-
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
+
* When this is the identity matrix, the primitive is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
38384
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
38385
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
38386
|
+
*
|
|
38387
|
+
* <p>
|
|
38388
|
+
* This property is only supported in 3D mode.
|
|
38389
|
+
* </p>
|
|
38383
38390
|
* @example
|
|
38384
38391
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
38385
|
-
|
|
38392
|
+
* p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
38386
38393
|
*/
|
|
38387
38394
|
modelMatrix: Matrix4;
|
|
38388
38395
|
/**
|
|
38389
38396
|
* Determines if the primitive will be shown. This affects all geometry
|
|
38390
|
-
|
|
38397
|
+
* instances in the primitive.
|
|
38391
38398
|
*/
|
|
38392
38399
|
show: boolean;
|
|
38393
38400
|
/**
|
|
38394
38401
|
* When <code>true</code>, the renderer frustum culls and horizon culls the primitive's commands
|
|
38395
|
-
|
|
38396
|
-
|
|
38402
|
+
* based on their bounding volume. Set this to <code>false</code> for a small performance gain
|
|
38403
|
+
* if you are manually culling the primitive.
|
|
38397
38404
|
*/
|
|
38398
38405
|
cull: boolean;
|
|
38399
38406
|
/**
|
|
38400
38407
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38408
|
+
* <p>
|
|
38409
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
38410
|
+
* </p>
|
|
38404
38411
|
*/
|
|
38405
38412
|
debugShowBoundingVolume: boolean;
|
|
38406
38413
|
/**
|
|
@@ -38433,8 +38440,8 @@ export class Primitive {
|
|
|
38433
38440
|
readonly compressVertices: boolean;
|
|
38434
38441
|
/**
|
|
38435
38442
|
* Determines if the primitive is complete and ready to render. If this property is
|
|
38436
|
-
|
|
38437
|
-
|
|
38443
|
+
* true, the primitive will be rendered the next time that {@link Primitive#update}
|
|
38444
|
+
* is called.
|
|
38438
38445
|
*/
|
|
38439
38446
|
readonly ready: boolean;
|
|
38440
38447
|
/**
|
|
@@ -38443,42 +38450,42 @@ export class Primitive {
|
|
|
38443
38450
|
readonly readyPromise: Promise<Primitive>;
|
|
38444
38451
|
/**
|
|
38445
38452
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38453
|
+
* get the draw commands needed to render this primitive.
|
|
38454
|
+
* <p>
|
|
38455
|
+
* Do not call this function directly. This is documented just to
|
|
38456
|
+
* list the exceptions that may be propagated when the scene is rendered:
|
|
38457
|
+
* </p>
|
|
38451
38458
|
*/
|
|
38452
38459
|
update(): void;
|
|
38453
38460
|
/**
|
|
38454
38461
|
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
|
|
38455
38462
|
* @example
|
|
38456
38463
|
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
38457
|
-
|
|
38458
|
-
|
|
38459
|
-
|
|
38460
|
-
|
|
38464
|
+
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
38465
|
+
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);
|
|
38466
|
+
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(100.0, 10000.0);
|
|
38467
|
+
* attributes.offset = Cesium.OffsetGeometryInstanceAttribute.toValue(Cartesian3.IDENTITY);
|
|
38461
38468
|
* @param id - The id of the {@link GeometryInstance}.
|
|
38462
38469
|
* @returns The typed array in the attribute's format or undefined if the is no instance with id.
|
|
38463
38470
|
*/
|
|
38464
38471
|
getGeometryInstanceAttributes(id: any): any;
|
|
38465
38472
|
/**
|
|
38466
38473
|
* Returns true if this object was destroyed; otherwise, false.
|
|
38467
|
-
|
|
38468
|
-
|
|
38469
|
-
|
|
38470
|
-
|
|
38474
|
+
* <p>
|
|
38475
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
38476
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
38477
|
+
* </p>
|
|
38471
38478
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
38472
38479
|
*/
|
|
38473
38480
|
isDestroyed(): boolean;
|
|
38474
38481
|
/**
|
|
38475
38482
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
38476
|
-
|
|
38477
|
-
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38483
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
38484
|
+
* <p>
|
|
38485
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
38486
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
38487
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
38488
|
+
* </p>
|
|
38482
38489
|
* @example
|
|
38483
38490
|
* e = e && e.destroy();
|
|
38484
38491
|
*/
|
|
@@ -40155,8 +40162,8 @@ export namespace TileCoordinatesImageryProvider {
|
|
|
40155
40162
|
* Initialization options for the TileCoordinatesImageryProvider constructor
|
|
40156
40163
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme for which to draw tiles.
|
|
40157
40164
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
40158
|
-
|
|
40159
|
-
|
|
40165
|
+
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
40166
|
+
* parameter is specified, the WGS84 ellipsoid is used.
|
|
40160
40167
|
* @property [color = Color.YELLOW] - The color to draw the tile box and label.
|
|
40161
40168
|
* @property [tileWidth = 256] - The width of the tile for level-of-detail selection purposes.
|
|
40162
40169
|
* @property [tileHeight = 256] - The height of the tile for level-of-detail selection purposes.
|
|
@@ -40172,35 +40179,35 @@ export namespace TileCoordinatesImageryProvider {
|
|
|
40172
40179
|
|
|
40173
40180
|
/**
|
|
40174
40181
|
* An {@link ImageryProvider} that draws a box around every rendered tile in the tiling scheme, and draws
|
|
40175
|
-
a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
|
|
40176
|
-
debugging terrain and imagery rendering problems.
|
|
40182
|
+
* a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
|
|
40183
|
+
* debugging terrain and imagery rendering problems.
|
|
40177
40184
|
* @param [options] - Object describing initialization options
|
|
40178
40185
|
*/
|
|
40179
40186
|
export class TileCoordinatesImageryProvider {
|
|
40180
40187
|
constructor(options?: TileCoordinatesImageryProvider.ConstructorOptions);
|
|
40181
40188
|
/**
|
|
40182
40189
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
40183
|
-
|
|
40190
|
+
* 1.0 representing fully opaque.
|
|
40184
40191
|
*/
|
|
40185
40192
|
defaultAlpha: number | undefined;
|
|
40186
40193
|
/**
|
|
40187
40194
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
40188
|
-
|
|
40195
|
+
* 1.0 representing fully opaque.
|
|
40189
40196
|
*/
|
|
40190
40197
|
defaultNightAlpha: number | undefined;
|
|
40191
40198
|
/**
|
|
40192
40199
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
40193
|
-
|
|
40200
|
+
* 1.0 representing fully opaque.
|
|
40194
40201
|
*/
|
|
40195
40202
|
defaultDayAlpha: number | undefined;
|
|
40196
40203
|
/**
|
|
40197
40204
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
40198
|
-
|
|
40205
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
40199
40206
|
*/
|
|
40200
40207
|
defaultBrightness: number | undefined;
|
|
40201
40208
|
/**
|
|
40202
40209
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
40203
|
-
|
|
40210
|
+
* the contrast while greater than 1.0 increases it.
|
|
40204
40211
|
*/
|
|
40205
40212
|
defaultContrast: number | undefined;
|
|
40206
40213
|
/**
|
|
@@ -40209,7 +40216,7 @@ export class TileCoordinatesImageryProvider {
|
|
|
40209
40216
|
defaultHue: number | undefined;
|
|
40210
40217
|
/**
|
|
40211
40218
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
40212
|
-
|
|
40219
|
+
* saturation while greater than 1.0 increases it.
|
|
40213
40220
|
*/
|
|
40214
40221
|
defaultSaturation: number | undefined;
|
|
40215
40222
|
/**
|
|
@@ -40230,45 +40237,45 @@ export class TileCoordinatesImageryProvider {
|
|
|
40230
40237
|
readonly proxy: Proxy;
|
|
40231
40238
|
/**
|
|
40232
40239
|
* Gets the width of each tile, in pixels. This function should
|
|
40233
|
-
|
|
40240
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40234
40241
|
*/
|
|
40235
40242
|
readonly tileWidth: number;
|
|
40236
40243
|
/**
|
|
40237
40244
|
* Gets the height of each tile, in pixels. This function should
|
|
40238
|
-
|
|
40245
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40239
40246
|
*/
|
|
40240
40247
|
readonly tileHeight: number;
|
|
40241
40248
|
/**
|
|
40242
40249
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
40243
|
-
|
|
40250
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40244
40251
|
*/
|
|
40245
40252
|
readonly maximumLevel: number | undefined;
|
|
40246
40253
|
/**
|
|
40247
40254
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
40248
|
-
|
|
40255
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40249
40256
|
*/
|
|
40250
40257
|
readonly minimumLevel: number;
|
|
40251
40258
|
/**
|
|
40252
40259
|
* Gets the tiling scheme used by this provider. This function should
|
|
40253
|
-
|
|
40260
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40254
40261
|
*/
|
|
40255
40262
|
readonly tilingScheme: TilingScheme;
|
|
40256
40263
|
/**
|
|
40257
40264
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
40258
|
-
|
|
40265
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40259
40266
|
*/
|
|
40260
40267
|
readonly rectangle: Rectangle;
|
|
40261
40268
|
/**
|
|
40262
40269
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
40263
|
-
|
|
40264
|
-
|
|
40265
|
-
|
|
40270
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
40271
|
+
* returns undefined, no tiles are filtered. This function should
|
|
40272
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40266
40273
|
*/
|
|
40267
40274
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
40268
40275
|
/**
|
|
40269
40276
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
40270
|
-
|
|
40271
|
-
|
|
40277
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
40278
|
+
* are passed an instance of {@link TileProviderError}.
|
|
40272
40279
|
*/
|
|
40273
40280
|
readonly errorEvent: Event;
|
|
40274
40281
|
/**
|
|
@@ -40281,15 +40288,15 @@ export class TileCoordinatesImageryProvider {
|
|
|
40281
40288
|
readonly readyPromise: Promise<boolean>;
|
|
40282
40289
|
/**
|
|
40283
40290
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
40284
|
-
|
|
40291
|
+
* the source of the imagery. This function should not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40285
40292
|
*/
|
|
40286
40293
|
readonly credit: Credit;
|
|
40287
40294
|
/**
|
|
40288
40295
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
40289
|
-
|
|
40290
|
-
|
|
40291
|
-
|
|
40292
|
-
|
|
40296
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
40297
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
40298
|
+
* as if their alpha is 1.0 everywhere. Setting this property to false reduces memory usage
|
|
40299
|
+
* and texture upload time.
|
|
40293
40300
|
*/
|
|
40294
40301
|
readonly hasAlphaChannel: boolean;
|
|
40295
40302
|
/**
|
|
@@ -40302,29 +40309,29 @@ export class TileCoordinatesImageryProvider {
|
|
|
40302
40309
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
40303
40310
|
/**
|
|
40304
40311
|
* Requests the image for a given tile. This function should
|
|
40305
|
-
|
|
40312
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40306
40313
|
* @param x - The tile X coordinate.
|
|
40307
40314
|
* @param y - The tile Y coordinate.
|
|
40308
40315
|
* @param level - The tile level.
|
|
40309
40316
|
* @param [request] - The request object. Intended for internal use only.
|
|
40310
40317
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40318
|
+
* undefined if there are too many active requests to the server, and the request
|
|
40319
|
+
* should be retried later. The resolved image may be either an
|
|
40320
|
+
* Image or a Canvas DOM object.
|
|
40314
40321
|
*/
|
|
40315
40322
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
40316
40323
|
/**
|
|
40317
40324
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
40318
|
-
|
|
40325
|
+
* undefined.
|
|
40319
40326
|
* @param x - The tile X coordinate.
|
|
40320
40327
|
* @param y - The tile Y coordinate.
|
|
40321
40328
|
* @param level - The tile level.
|
|
40322
40329
|
* @param longitude - The longitude at which to pick features.
|
|
40323
40330
|
* @param latitude - The latitude at which to pick features.
|
|
40324
40331
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40332
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
40333
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
40334
|
+
* It may also be undefined if picking is not supported.
|
|
40328
40335
|
*/
|
|
40329
40336
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
40330
40337
|
}
|