mars3d-cesium 1.92.1 → 1.92.4
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 +873 -873
- package/Build/Cesium/Cesium.js +8 -8
- 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/package.json +8 -6
- 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
|
@@ -2867,12 +2867,12 @@ export class CatmullRomSpline {
|
|
|
2867
2867
|
* A {@link TerrainProvider} that accesses terrain data in a Cesium terrain format.
|
|
2868
2868
|
* @example
|
|
2869
2869
|
* // Create Arctic DEM terrain with normals.
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2870
|
+
const viewer = new Cesium.Viewer('cesiumContainer', {
|
|
2871
|
+
terrainProvider : new Cesium.CesiumTerrainProvider({
|
|
2872
|
+
url : Cesium.IonResource.fromAssetId(3956),
|
|
2873
|
+
requestVertexNormals : true
|
|
2874
|
+
})
|
|
2875
|
+
});
|
|
2876
2876
|
* @param options - Object with the following properties:
|
|
2877
2877
|
* @param options.url - The URL of the Cesium terrain server.
|
|
2878
2878
|
* @param [options.requestVertexNormals = false] - Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
|
|
@@ -2892,31 +2892,31 @@ export class CesiumTerrainProvider {
|
|
|
2892
2892
|
});
|
|
2893
2893
|
/**
|
|
2894
2894
|
* Requests the geometry for a given tile. This function should not be called before
|
|
2895
|
-
|
|
2896
|
-
|
|
2895
|
+
{@link CesiumTerrainProvider#ready} returns true. The result must include terrain data and
|
|
2896
|
+
may optionally include a water mask and an indication of which child tiles are available.
|
|
2897
2897
|
* @param x - The X coordinate of the tile for which to request geometry.
|
|
2898
2898
|
* @param y - The Y coordinate of the tile for which to request geometry.
|
|
2899
2899
|
* @param level - The level of the tile for which to request geometry.
|
|
2900
2900
|
* @param [request] - The request object. Intended for internal use only.
|
|
2901
2901
|
* @returns A promise for the requested geometry. If this method
|
|
2902
|
-
|
|
2903
|
-
|
|
2902
|
+
returns undefined instead of a promise, it is an indication that too many requests are already
|
|
2903
|
+
pending and the request will be retried later.
|
|
2904
2904
|
*/
|
|
2905
2905
|
requestTileGeometry(x: number, y: number, level: number, request?: Request): Promise<TerrainData> | undefined;
|
|
2906
2906
|
/**
|
|
2907
2907
|
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
|
|
2908
|
-
|
|
2909
|
-
|
|
2908
|
+
to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
2909
|
+
are passed an instance of {@link TileProviderError}.
|
|
2910
2910
|
*/
|
|
2911
2911
|
readonly errorEvent: Event;
|
|
2912
2912
|
/**
|
|
2913
2913
|
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
|
|
2914
|
-
|
|
2914
|
+
the source of the terrain. This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
|
2915
2915
|
*/
|
|
2916
2916
|
readonly credit: Credit;
|
|
2917
2917
|
/**
|
|
2918
2918
|
* Gets the tiling scheme used by this provider. This function should
|
|
2919
|
-
|
|
2919
|
+
not be called before {@link CesiumTerrainProvider#ready} returns true.
|
|
2920
2920
|
*/
|
|
2921
2921
|
readonly tilingScheme: GeographicTilingScheme;
|
|
2922
2922
|
/**
|
|
@@ -2929,47 +2929,47 @@ export class CesiumTerrainProvider {
|
|
|
2929
2929
|
readonly readyPromise: Promise<boolean>;
|
|
2930
2930
|
/**
|
|
2931
2931
|
* Gets a value indicating whether or not the provider includes a water mask. The water mask
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2932
|
+
indicates which areas of the globe are water rather than land, so they can be rendered
|
|
2933
|
+
as a reflective surface with animated waves. This function should not be
|
|
2934
|
+
called before {@link CesiumTerrainProvider#ready} returns true.
|
|
2935
2935
|
*/
|
|
2936
2936
|
readonly hasWaterMask: boolean;
|
|
2937
2937
|
/**
|
|
2938
2938
|
* Gets a value indicating whether or not the requested tiles include vertex normals.
|
|
2939
|
-
|
|
2939
|
+
This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
|
2940
2940
|
*/
|
|
2941
2941
|
readonly hasVertexNormals: boolean;
|
|
2942
2942
|
/**
|
|
2943
2943
|
* Gets a value indicating whether or not the requested tiles include metadata.
|
|
2944
|
-
|
|
2944
|
+
This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
|
2945
2945
|
*/
|
|
2946
2946
|
readonly hasMetadata: boolean;
|
|
2947
2947
|
/**
|
|
2948
2948
|
* Boolean flag that indicates if the client should request vertex normals from the server.
|
|
2949
|
-
|
|
2950
|
-
|
|
2949
|
+
Vertex normals data is appended to the standard tile mesh data only if the client requests the vertex normals and
|
|
2950
|
+
if the server provides vertex normals.
|
|
2951
2951
|
*/
|
|
2952
2952
|
readonly requestVertexNormals: boolean;
|
|
2953
2953
|
/**
|
|
2954
2954
|
* Boolean flag that indicates if the client should request a watermask from the server.
|
|
2955
|
-
|
|
2956
|
-
|
|
2955
|
+
Watermask data is appended to the standard tile mesh data only if the client requests the watermask and
|
|
2956
|
+
if the server provides a watermask.
|
|
2957
2957
|
*/
|
|
2958
2958
|
readonly requestWaterMask: boolean;
|
|
2959
2959
|
/**
|
|
2960
2960
|
* Boolean flag that indicates if the client should request metadata from the server.
|
|
2961
|
-
|
|
2962
|
-
|
|
2961
|
+
Metadata is appended to the standard tile mesh data only if the client requests the metadata and
|
|
2962
|
+
if the server provides a metadata.
|
|
2963
2963
|
*/
|
|
2964
2964
|
readonly requestMetadata: boolean;
|
|
2965
2965
|
/**
|
|
2966
2966
|
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2967
|
+
at points and in rectangles. This function should not be called before
|
|
2968
|
+
{@link CesiumTerrainProvider#ready} returns true. This property may be undefined if availability
|
|
2969
|
+
information is not available. Note that this reflects tiles that are known to be available currently.
|
|
2970
|
+
Additional tiles may be discovered to be available in the future, e.g. if availability information
|
|
2971
|
+
exists deeper in the tree rather than it all being discoverable at the root. However, a tile that
|
|
2972
|
+
is available now will not become unavailable in the future.
|
|
2973
2973
|
*/
|
|
2974
2974
|
readonly availability: TileAvailability;
|
|
2975
2975
|
/**
|
|
@@ -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.
|
|
@@ -27497,32 +27497,32 @@ export class Cesium3DTilePointFeature {
|
|
|
27497
27497
|
|
|
27498
27498
|
/**
|
|
27499
27499
|
* A {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
27500
|
-
|
|
27500
|
+
used for streaming massive heterogeneous 3D geospatial datasets.
|
|
27501
27501
|
* @example
|
|
27502
27502
|
* const tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
27503
|
-
|
|
27504
|
-
|
|
27503
|
+
url : 'http://localhost:8002/tilesets/Seattle/tileset.json'
|
|
27504
|
+
}));
|
|
27505
27505
|
* @example
|
|
27506
27506
|
* // Common setting for the skipLevelOfDetail optimization
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
27511
|
-
|
|
27512
|
-
|
|
27513
|
-
|
|
27514
|
-
|
|
27515
|
-
|
|
27516
|
-
|
|
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
|
+
}));
|
|
27517
27517
|
* @example
|
|
27518
27518
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
27519
|
-
|
|
27520
|
-
|
|
27521
|
-
|
|
27522
|
-
|
|
27523
|
-
|
|
27524
|
-
|
|
27525
|
-
|
|
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
|
+
}));
|
|
27526
27526
|
* @param options - Object with the following properties:
|
|
27527
27527
|
* @param options.url - The url to a tileset JSON file.
|
|
27528
27528
|
* @param [options.show = true] - Determines if the tileset will be shown.
|
|
@@ -27668,68 +27668,68 @@ export class Cesium3DTileset {
|
|
|
27668
27668
|
preloadFlightDestinations: boolean;
|
|
27669
27669
|
/**
|
|
27670
27670
|
* Optimization option. Whether the tileset should refine based on a dynamic screen space error. Tiles that are further
|
|
27671
|
-
|
|
27672
|
-
|
|
27673
|
-
|
|
27674
|
-
|
|
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.
|
|
27675
27675
|
*/
|
|
27676
27676
|
dynamicScreenSpaceError: boolean;
|
|
27677
27677
|
/**
|
|
27678
27678
|
* Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
|
|
27679
|
-
|
|
27680
|
-
|
|
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.
|
|
27681
27681
|
*/
|
|
27682
27682
|
foveatedScreenSpaceError: boolean;
|
|
27683
27683
|
/**
|
|
27684
27684
|
* Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
27685
|
-
|
|
27685
|
+
interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
27686
27686
|
*/
|
|
27687
27687
|
foveatedInterpolationCallback: Cesium3DTileset.foveatedInterpolationCallback;
|
|
27688
27688
|
/**
|
|
27689
27689
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control
|
|
27690
|
-
|
|
27691
|
-
|
|
27692
|
-
|
|
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.
|
|
27693
27693
|
*/
|
|
27694
27694
|
foveatedTimeDelay: number;
|
|
27695
27695
|
/**
|
|
27696
27696
|
* A scalar that determines the density used to adjust the dynamic screen space error, similar to {@link Fog}. Increasing this
|
|
27697
|
-
|
|
27698
|
-
|
|
27699
|
-
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
|
|
27703
|
-
|
|
27704
|
-
|
|
27705
|
-
|
|
27706
|
-
|
|
27707
|
-
|
|
27708
|
-
|
|
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>
|
|
27709
27709
|
*/
|
|
27710
27710
|
dynamicScreenSpaceErrorDensity: number;
|
|
27711
27711
|
/**
|
|
27712
27712
|
* A factor used to increase the screen space error of tiles for dynamic screen space error. As this value increases less tiles
|
|
27713
|
-
|
|
27713
|
+
are requested for rendering and tiles in the distance will have lower detail. If set to zero, the feature will be disabled.
|
|
27714
27714
|
*/
|
|
27715
27715
|
dynamicScreenSpaceErrorFactor: number;
|
|
27716
27716
|
/**
|
|
27717
27717
|
* A ratio of the tileset's height at which the density starts to falloff. If the camera is below this height the
|
|
27718
|
-
|
|
27719
|
-
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
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>
|
|
27723
27723
|
*/
|
|
27724
27724
|
dynamicScreenSpaceErrorHeightFalloff: number;
|
|
27725
27725
|
/**
|
|
27726
27726
|
* Determines whether the tileset casts or receives shadows from light sources.
|
|
27727
|
-
|
|
27728
|
-
|
|
27729
|
-
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
|
|
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>
|
|
27733
27733
|
*/
|
|
27734
27734
|
shadows: ShadowMode;
|
|
27735
27735
|
/**
|
|
@@ -27738,212 +27738,212 @@ export class Cesium3DTileset {
|
|
|
27738
27738
|
show: boolean;
|
|
27739
27739
|
/**
|
|
27740
27740
|
* Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
|
|
27741
|
-
|
|
27741
|
+
the original feature, e.g. glTF material or per-point color in the tile.
|
|
27742
27742
|
*/
|
|
27743
27743
|
colorBlendMode: Cesium3DTileColorBlendMode;
|
|
27744
27744
|
/**
|
|
27745
27745
|
* Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is <code>MIX</code>.
|
|
27746
|
-
|
|
27747
|
-
|
|
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.
|
|
27748
27748
|
*/
|
|
27749
27749
|
colorBlendAmount: number;
|
|
27750
27750
|
/**
|
|
27751
27751
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
27752
|
-
|
|
27753
|
-
|
|
27754
|
-
|
|
27755
|
-
|
|
27756
|
-
|
|
27757
|
-
|
|
27758
|
-
|
|
27759
|
-
|
|
27760
|
-
|
|
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>
|
|
27761
27761
|
* @example
|
|
27762
27762
|
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
27763
|
-
|
|
27764
|
-
|
|
27765
|
-
|
|
27766
|
-
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27763
|
+
if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
27764
|
+
console.log('Stopped loading');
|
|
27765
|
+
return;
|
|
27766
|
+
}
|
|
27767
|
+
|
|
27768
|
+
console.log('Loading: requests: ' + numberOfPendingRequests + ', processing: ' + numberOfTilesProcessing);
|
|
27769
|
+
});
|
|
27770
27770
|
*/
|
|
27771
27771
|
loadProgress: Event;
|
|
27772
27772
|
/**
|
|
27773
27773
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
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>
|
|
27778
27778
|
* @example
|
|
27779
27779
|
* tileset.allTilesLoaded.addEventListener(function() {
|
|
27780
|
-
|
|
27781
|
-
|
|
27780
|
+
console.log('All tiles are loaded');
|
|
27781
|
+
});
|
|
27782
27782
|
*/
|
|
27783
27783
|
allTilesLoaded: Event;
|
|
27784
27784
|
/**
|
|
27785
27785
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
|
|
27789
|
-
|
|
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>
|
|
27790
27790
|
* @example
|
|
27791
27791
|
* tileset.initialTilesLoaded.addEventListener(function() {
|
|
27792
|
-
|
|
27793
|
-
|
|
27792
|
+
console.log('Initial tiles are loaded');
|
|
27793
|
+
});
|
|
27794
27794
|
*/
|
|
27795
27795
|
initialTilesLoaded: Event;
|
|
27796
27796
|
/**
|
|
27797
27797
|
* The event fired to indicate that a tile's content was loaded.
|
|
27798
|
-
|
|
27799
|
-
|
|
27800
|
-
|
|
27801
|
-
|
|
27802
|
-
|
|
27803
|
-
|
|
27804
|
-
|
|
27805
|
-
|
|
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>
|
|
27806
27806
|
* @example
|
|
27807
27807
|
* tileset.tileLoad.addEventListener(function(tile) {
|
|
27808
|
-
|
|
27809
|
-
|
|
27808
|
+
console.log('A tile was loaded.');
|
|
27809
|
+
});
|
|
27810
27810
|
*/
|
|
27811
27811
|
tileLoad: Event;
|
|
27812
27812
|
/**
|
|
27813
27813
|
* The event fired to indicate that a tile's content was unloaded.
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
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>
|
|
27822
27822
|
* @example
|
|
27823
27823
|
* tileset.tileUnload.addEventListener(function(tile) {
|
|
27824
|
-
|
|
27825
|
-
|
|
27824
|
+
console.log('A tile was unloaded from the cache.');
|
|
27825
|
+
});
|
|
27826
27826
|
*/
|
|
27827
27827
|
tileUnload: Event;
|
|
27828
27828
|
/**
|
|
27829
27829
|
* The event fired to indicate that a tile's content failed to load.
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
|
|
27834
|
-
|
|
27835
|
-
|
|
27836
|
-
|
|
27837
|
-
|
|
27838
|
-
|
|
27839
|
-
|
|
27840
|
-
|
|
27841
|
-
|
|
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>
|
|
27842
27842
|
* @example
|
|
27843
27843
|
* tileset.tileFailed.addEventListener(function(error) {
|
|
27844
|
-
|
|
27845
|
-
|
|
27846
|
-
|
|
27844
|
+
console.log('An error occurred loading tile: ' + error.url);
|
|
27845
|
+
console.log('Error: ' + error.message);
|
|
27846
|
+
});
|
|
27847
27847
|
*/
|
|
27848
27848
|
tileFailed: Event;
|
|
27849
27849
|
/**
|
|
27850
27850
|
* This event fires once for each visible tile in a frame. This can be used to manually
|
|
27851
|
-
|
|
27852
|
-
|
|
27853
|
-
|
|
27854
|
-
|
|
27855
|
-
|
|
27856
|
-
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
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>
|
|
27860
27860
|
* @example
|
|
27861
27861
|
* tileset.tileVisible.addEventListener(function(tile) {
|
|
27862
|
-
|
|
27863
|
-
|
|
27864
|
-
|
|
27865
|
-
|
|
27862
|
+
if (tile.content instanceof Cesium.Batched3DModel3DTileContent) {
|
|
27863
|
+
console.log('A Batched 3D Model tile is visible.');
|
|
27864
|
+
}
|
|
27865
|
+
});
|
|
27866
27866
|
* @example
|
|
27867
27867
|
* // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
|
|
27868
|
-
|
|
27869
|
-
|
|
27870
|
-
|
|
27871
|
-
|
|
27872
|
-
|
|
27873
|
-
|
|
27874
|
-
|
|
27875
|
-
|
|
27876
|
-
|
|
27877
|
-
|
|
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
|
+
});
|
|
27878
27878
|
*/
|
|
27879
27879
|
tileVisible: Event;
|
|
27880
27880
|
/**
|
|
27881
27881
|
* Optimization option. Determines if level of detail skipping should be applied during the traversal.
|
|
27882
|
-
|
|
27883
|
-
|
|
27884
|
-
|
|
27885
|
-
|
|
27886
|
-
|
|
27887
|
-
|
|
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>
|
|
27888
27888
|
*/
|
|
27889
27889
|
skipLevelOfDetail: boolean;
|
|
27890
27890
|
/**
|
|
27891
27891
|
* The screen space error that must be reached before skipping levels of detail.
|
|
27892
|
-
|
|
27893
|
-
|
|
27894
|
-
|
|
27892
|
+
<p>
|
|
27893
|
+
Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
27894
|
+
</p>
|
|
27895
27895
|
*/
|
|
27896
27896
|
baseScreenSpaceError: number;
|
|
27897
27897
|
/**
|
|
27898
27898
|
* Multiplier defining the minimum screen space error to skip.
|
|
27899
|
-
|
|
27900
|
-
|
|
27901
|
-
|
|
27902
|
-
|
|
27903
|
-
|
|
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>
|
|
27904
27904
|
*/
|
|
27905
27905
|
skipScreenSpaceErrorFactor: number;
|
|
27906
27906
|
/**
|
|
27907
27907
|
* Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped.
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
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>
|
|
27912
27912
|
*/
|
|
27913
27913
|
skipLevels: number;
|
|
27914
27914
|
/**
|
|
27915
27915
|
* When true, only tiles that meet the maximum screen space error will ever be downloaded.
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
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>
|
|
27920
27920
|
*/
|
|
27921
27921
|
immediatelyLoadDesiredLevelOfDetail: boolean;
|
|
27922
27922
|
/**
|
|
27923
27923
|
* Determines whether siblings of visible tiles are always downloaded during traversal.
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
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>
|
|
27928
27928
|
*/
|
|
27929
27929
|
loadSiblings: boolean;
|
|
27930
27930
|
/**
|
|
27931
27931
|
* The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
|
|
27932
|
-
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
|
|
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>
|
|
27936
27936
|
*/
|
|
27937
27937
|
lightColor: Cartesian3;
|
|
27938
27938
|
/**
|
|
27939
27939
|
* Whether to cull back-facing geometry. When true, back face culling is determined
|
|
27940
|
-
|
|
27940
|
+
by the glTF material's doubleSided property; when false, back face culling is disabled.
|
|
27941
27941
|
*/
|
|
27942
27942
|
backFaceCulling: boolean;
|
|
27943
27943
|
/**
|
|
27944
27944
|
* Whether to display the outline for models using the
|
|
27945
|
-
|
|
27946
|
-
|
|
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.
|
|
27947
27947
|
*/
|
|
27948
27948
|
readonly showOutline: boolean;
|
|
27949
27949
|
/**
|
|
@@ -27952,79 +27952,79 @@ export class Cesium3DTileset {
|
|
|
27952
27952
|
splitDirection: SplitDirection;
|
|
27953
27953
|
/**
|
|
27954
27954
|
* This property is for debugging only; it is not optimized for production use.
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
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>
|
|
27960
27960
|
*/
|
|
27961
27961
|
debugFreezeFrame: boolean;
|
|
27962
27962
|
/**
|
|
27963
27963
|
* This property is for debugging only; it is not optimized for production use.
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
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>
|
|
27969
27969
|
*/
|
|
27970
27970
|
debugColorizeTiles: boolean;
|
|
27971
27971
|
/**
|
|
27972
27972
|
* This property is for debugging only; it is not optimized for production use.
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27973
|
+
<p>
|
|
27974
|
+
When true, renders each tile's content as a wireframe.
|
|
27975
|
+
</p>
|
|
27976
27976
|
*/
|
|
27977
27977
|
debugWireframe: boolean;
|
|
27978
27978
|
/**
|
|
27979
27979
|
* This property is for debugging only; it is not optimized for production use.
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
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>
|
|
27985
27985
|
*/
|
|
27986
27986
|
debugShowBoundingVolume: boolean;
|
|
27987
27987
|
/**
|
|
27988
27988
|
* This property is for debugging only; it is not optimized for production use.
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
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>
|
|
27993
27993
|
*/
|
|
27994
27994
|
debugShowContentBoundingVolume: boolean;
|
|
27995
27995
|
/**
|
|
27996
27996
|
* This property is for debugging only; it is not optimized for production use.
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
27997
|
+
<p>
|
|
27998
|
+
When true, renders the viewer request volume for each tile.
|
|
27999
|
+
</p>
|
|
28000
28000
|
*/
|
|
28001
28001
|
debugShowViewerRequestVolume: boolean;
|
|
28002
28002
|
/**
|
|
28003
28003
|
* This property is for debugging only; it is not optimized for production use.
|
|
28004
|
-
|
|
28005
|
-
|
|
28006
|
-
|
|
28004
|
+
<p>
|
|
28005
|
+
When true, draws labels to indicate the geometric error of each tile.
|
|
28006
|
+
</p>
|
|
28007
28007
|
*/
|
|
28008
28008
|
debugShowGeometricError: boolean;
|
|
28009
28009
|
/**
|
|
28010
28010
|
* This property is for debugging only; it is not optimized for production use.
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28011
|
+
<p>
|
|
28012
|
+
When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
|
|
28013
|
+
</p>
|
|
28014
28014
|
*/
|
|
28015
28015
|
debugShowRenderingStatistics: boolean;
|
|
28016
28016
|
/**
|
|
28017
28017
|
* This property is for debugging only; it is not optimized for production use.
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28018
|
+
<p>
|
|
28019
|
+
When true, draws labels to indicate the geometry and texture memory usage of each tile.
|
|
28020
|
+
</p>
|
|
28021
28021
|
*/
|
|
28022
28022
|
debugShowMemoryUsage: boolean;
|
|
28023
28023
|
/**
|
|
28024
28024
|
* This property is for debugging only; it is not optimized for production use.
|
|
28025
|
-
|
|
28026
|
-
|
|
28027
|
-
|
|
28025
|
+
<p>
|
|
28026
|
+
When true, draws labels to indicate the url of each tile.
|
|
28027
|
+
</p>
|
|
28028
28028
|
*/
|
|
28029
28029
|
debugShowUrl: boolean;
|
|
28030
28030
|
/**
|
|
@@ -28033,10 +28033,10 @@ export class Cesium3DTileset {
|
|
|
28033
28033
|
examineVectorLinesFunction: (...params: any[]) => any;
|
|
28034
28034
|
/**
|
|
28035
28035
|
* Gets the tileset's asset object property, which contains metadata about the tileset.
|
|
28036
|
-
|
|
28037
|
-
|
|
28038
|
-
|
|
28039
|
-
|
|
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>
|
|
28040
28040
|
*/
|
|
28041
28041
|
readonly asset: any;
|
|
28042
28042
|
/**
|
|
@@ -28049,40 +28049,40 @@ export class Cesium3DTileset {
|
|
|
28049
28049
|
clippingPlanes: ClippingPlaneCollection;
|
|
28050
28050
|
/**
|
|
28051
28051
|
* Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
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>
|
|
28056
28056
|
* @example
|
|
28057
28057
|
* console.log('Maximum building height: ' + tileset.properties.height.maximum);
|
|
28058
|
-
|
|
28058
|
+
console.log('Minimum building height: ' + tileset.properties.height.minimum);
|
|
28059
28059
|
*/
|
|
28060
28060
|
readonly properties: any;
|
|
28061
28061
|
/**
|
|
28062
28062
|
* When <code>true</code>, the tileset's root tile is loaded and the tileset is ready to render.
|
|
28063
|
-
|
|
28063
|
+
This is set to <code>true</code> right before {@link Cesium3DTileset#readyPromise} is resolved.
|
|
28064
28064
|
*/
|
|
28065
28065
|
readonly ready: boolean;
|
|
28066
28066
|
/**
|
|
28067
28067
|
* Gets the promise that will be resolved when the tileset's root tile is loaded and the tileset is ready to render.
|
|
28068
|
-
|
|
28069
|
-
|
|
28070
|
-
|
|
28068
|
+
<p>
|
|
28069
|
+
This promise is resolved at the end of the frame before the first frame the tileset is rendered in.
|
|
28070
|
+
</p>
|
|
28071
28071
|
* @example
|
|
28072
28072
|
* tileset.readyPromise.then(function(tileset) {
|
|
28073
|
-
|
|
28074
|
-
|
|
28075
|
-
|
|
28076
|
-
|
|
28077
|
-
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
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
|
+
});
|
|
28081
28081
|
*/
|
|
28082
28082
|
readonly readyPromise: Promise<Cesium3DTileset>;
|
|
28083
28083
|
/**
|
|
28084
28084
|
* When <code>true</code>, all tiles that meet the screen space error this frame are loaded. The tileset is
|
|
28085
|
-
|
|
28085
|
+
completely loaded for this view.
|
|
28086
28086
|
*/
|
|
28087
28087
|
readonly tilesLoaded: boolean;
|
|
28088
28088
|
/**
|
|
@@ -28095,82 +28095,82 @@ export class Cesium3DTileset {
|
|
|
28095
28095
|
readonly basePath: string;
|
|
28096
28096
|
/**
|
|
28097
28097
|
* The style, defined using the
|
|
28098
|
-
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28110
|
-
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
|
|
28114
|
-
|
|
28115
|
-
|
|
28116
|
-
|
|
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>
|
|
28117
28117
|
* @example
|
|
28118
28118
|
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
28119
|
-
|
|
28120
|
-
|
|
28121
|
-
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28128
|
-
|
|
28129
|
-
|
|
28130
|
-
|
|
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
|
+
});
|
|
28131
28131
|
*/
|
|
28132
28132
|
style: Cesium3DTileStyle | undefined;
|
|
28133
28133
|
/**
|
|
28134
28134
|
* A custom shader to apply to all tiles in the tileset. Only used for
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
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>
|
|
28140
28140
|
*/
|
|
28141
28141
|
customShader: CustomShader | undefined;
|
|
28142
28142
|
/**
|
|
28143
28143
|
* The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
|
|
28144
|
-
|
|
28145
|
-
|
|
28146
|
-
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
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>
|
|
28154
28154
|
*/
|
|
28155
28155
|
maximumScreenSpaceError: number;
|
|
28156
28156
|
/**
|
|
28157
28157
|
* The maximum amount of GPU memory (in MB) that may be used to cache tiles. This value is estimated from
|
|
28158
|
-
|
|
28159
|
-
|
|
28160
|
-
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28168
|
-
|
|
28169
|
-
|
|
28170
|
-
|
|
28171
|
-
|
|
28172
|
-
|
|
28173
|
-
|
|
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>
|
|
28174
28174
|
*/
|
|
28175
28175
|
maximumMemoryUsage: number;
|
|
28176
28176
|
/**
|
|
@@ -28185,26 +28185,26 @@ export class Cesium3DTileset {
|
|
|
28185
28185
|
* The tileset's bounding sphere.
|
|
28186
28186
|
* @example
|
|
28187
28187
|
* const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
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
|
+
});
|
|
28195
28195
|
*/
|
|
28196
28196
|
readonly boundingSphere: BoundingSphere;
|
|
28197
28197
|
/**
|
|
28198
28198
|
* A 4x4 transformation matrix that transforms the entire tileset.
|
|
28199
28199
|
* @example
|
|
28200
28200
|
* // Adjust a tileset's height from the globe's surface.
|
|
28201
|
-
|
|
28202
|
-
|
|
28203
|
-
|
|
28204
|
-
|
|
28205
|
-
|
|
28206
|
-
|
|
28207
|
-
|
|
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);
|
|
28208
28208
|
*/
|
|
28209
28209
|
modelMatrix: Matrix4;
|
|
28210
28210
|
/**
|
|
@@ -28213,28 +28213,28 @@ export class Cesium3DTileset {
|
|
|
28213
28213
|
readonly timeSinceLoad: number;
|
|
28214
28214
|
/**
|
|
28215
28215
|
* The total amount of GPU memory in bytes used by the tileset. This value is estimated from
|
|
28216
|
-
|
|
28217
|
-
|
|
28216
|
+
geometry, texture, and batch table textures of loaded tiles. For point clouds, this value also
|
|
28217
|
+
includes per-point metadata.
|
|
28218
28218
|
*/
|
|
28219
28219
|
readonly totalMemoryUsageInBytes: number;
|
|
28220
28220
|
/**
|
|
28221
28221
|
* Determines whether terrain, 3D Tiles or both will be classified by this tileset.
|
|
28222
|
-
|
|
28223
|
-
|
|
28224
|
-
|
|
28225
|
-
|
|
28226
|
-
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28236
|
-
|
|
28237
|
-
|
|
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>
|
|
28238
28238
|
*/
|
|
28239
28239
|
readonly classificationType: ClassificationType;
|
|
28240
28240
|
/**
|
|
@@ -28243,18 +28243,18 @@ export class Cesium3DTileset {
|
|
|
28243
28243
|
readonly ellipsoid: Ellipsoid;
|
|
28244
28244
|
/**
|
|
28245
28245
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
|
|
28246
|
-
|
|
28247
|
-
|
|
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.
|
|
28248
28248
|
*/
|
|
28249
28249
|
foveatedConeSize: number;
|
|
28250
28250
|
/**
|
|
28251
28251
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
|
|
28252
|
-
|
|
28252
|
+
The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
|
|
28253
28253
|
*/
|
|
28254
28254
|
foveatedMinimumScreenSpaceErrorRelaxation: number;
|
|
28255
28255
|
/**
|
|
28256
28256
|
* Returns the <code>extras</code> property at the top-level of the tileset JSON, which contains application specific metadata.
|
|
28257
|
-
|
|
28257
|
+
Returns <code>undefined</code> if <code>extras</code> does not exist.
|
|
28258
28258
|
*/
|
|
28259
28259
|
readonly extras: any;
|
|
28260
28260
|
/**
|
|
@@ -28263,25 +28263,25 @@ export class Cesium3DTileset {
|
|
|
28263
28263
|
imageBasedLighting: ImageBasedLighting;
|
|
28264
28264
|
/**
|
|
28265
28265
|
* Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
|
|
28266
|
-
|
|
28266
|
+
diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
|
|
28267
28267
|
*/
|
|
28268
28268
|
imageBasedLightingFactor: Cartesian2;
|
|
28269
28269
|
/**
|
|
28270
28270
|
* The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
|
|
28271
|
-
|
|
28271
|
+
This is used when {@link Cesium3DTileset#specularEnvironmentMaps} and {@link Cesium3DTileset#sphericalHarmonicCoefficients} are not defined.
|
|
28272
28272
|
*/
|
|
28273
28273
|
luminanceAtZenith: number;
|
|
28274
28274
|
/**
|
|
28275
28275
|
* The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
|
|
28276
|
-
|
|
28277
|
-
|
|
28278
|
-
|
|
28279
|
-
|
|
28280
|
-
|
|
28281
|
-
|
|
28282
|
-
|
|
28283
|
-
|
|
28284
|
-
|
|
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}.
|
|
28285
28285
|
*/
|
|
28286
28286
|
sphericalHarmonicCoefficients: Cartesian3[];
|
|
28287
28287
|
/**
|
|
@@ -28294,7 +28294,7 @@ export class Cesium3DTileset {
|
|
|
28294
28294
|
vectorClassificationOnly: boolean;
|
|
28295
28295
|
/**
|
|
28296
28296
|
* Whether vector tiles should keep decoded positions in memory.
|
|
28297
|
-
|
|
28297
|
+
This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
|
|
28298
28298
|
*/
|
|
28299
28299
|
vectorKeepDecodedPositions: boolean;
|
|
28300
28300
|
/**
|
|
@@ -28303,52 +28303,52 @@ export class Cesium3DTileset {
|
|
|
28303
28303
|
showCreditsOnScreen: boolean;
|
|
28304
28304
|
/**
|
|
28305
28305
|
* Label of the feature ID set to use for picking and styling.
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
|
|
28311
|
-
|
|
28312
|
-
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
|
-
|
|
28316
|
-
|
|
28317
|
-
|
|
28318
|
-
|
|
28319
|
-
|
|
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>
|
|
28320
28320
|
*/
|
|
28321
28321
|
featureIdLabel: string;
|
|
28322
28322
|
/**
|
|
28323
28323
|
* Label of the instance feature ID set used for picking and styling.
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
|
|
28327
|
-
|
|
28328
|
-
|
|
28329
|
-
|
|
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>
|
|
28330
28330
|
*/
|
|
28331
28331
|
instanceFeatureIdLabel: string;
|
|
28332
28332
|
/**
|
|
28333
28333
|
* Provides a hook to override the method used to request the tileset json
|
|
28334
|
-
|
|
28334
|
+
useful when fetching tilesets from remote servers
|
|
28335
28335
|
* @param tilesetUrl - The url of the json file to be fetched
|
|
28336
28336
|
* @returns A promise that resolves with the fetched json data
|
|
28337
28337
|
*/
|
|
28338
28338
|
static loadJson(tilesetUrl: Resource | string): Promise<object>;
|
|
28339
28339
|
/**
|
|
28340
28340
|
* Marks the tileset's {@link Cesium3DTileset#style} as dirty, which forces all
|
|
28341
|
-
|
|
28341
|
+
features to re-evaluate the style in the next frame each is visible.
|
|
28342
28342
|
*/
|
|
28343
28343
|
makeStyleDirty(): void;
|
|
28344
28344
|
/**
|
|
28345
28345
|
* Unloads all tiles that weren't selected the previous frame. This can be used to
|
|
28346
|
-
|
|
28347
|
-
|
|
28348
|
-
|
|
28349
|
-
|
|
28350
|
-
|
|
28351
|
-
|
|
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>
|
|
28352
28352
|
*/
|
|
28353
28353
|
trimLoadedTiles(): void;
|
|
28354
28354
|
/**
|
|
@@ -28359,19 +28359,19 @@ export class Cesium3DTileset {
|
|
|
28359
28359
|
hasExtension(extensionName: string): boolean;
|
|
28360
28360
|
/**
|
|
28361
28361
|
* Returns true if this object was destroyed; otherwise, false.
|
|
28362
|
-
|
|
28363
|
-
|
|
28364
|
-
|
|
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.
|
|
28365
28365
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
28366
28366
|
*/
|
|
28367
28367
|
isDestroyed(): boolean;
|
|
28368
28368
|
/**
|
|
28369
28369
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
28370
|
-
|
|
28371
|
-
|
|
28372
|
-
|
|
28373
|
-
|
|
28374
|
-
|
|
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.
|
|
28375
28375
|
* @example
|
|
28376
28376
|
* tileset = tileset && tileset.destroy();
|
|
28377
28377
|
*/
|
|
@@ -28381,7 +28381,7 @@ export class Cesium3DTileset {
|
|
|
28381
28381
|
export namespace Cesium3DTileset {
|
|
28382
28382
|
/**
|
|
28383
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,
|
|
28384
|
-
|
|
28384
|
+
interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
28385
28385
|
* @param p - The start value to interpolate.
|
|
28386
28386
|
* @param q - The end value to interpolate.
|
|
28387
28387
|
* @param time - The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
|
|
@@ -32284,85 +32284,85 @@ export class ImageBasedLighting {
|
|
|
32284
32284
|
|
|
32285
32285
|
/**
|
|
32286
32286
|
* An imagery layer that displays tiled image data from a single imagery provider
|
|
32287
|
-
|
|
32287
|
+
on a {@link Globe}.
|
|
32288
32288
|
* @param imageryProvider - The imagery provider to use.
|
|
32289
32289
|
* @param [options] - Object with the following properties:
|
|
32290
32290
|
* @param [options.rectangle = imageryProvider.rectangle] - The rectangle of the layer. This rectangle
|
|
32291
|
-
|
|
32291
|
+
can limit the visible portion of the imagery provider.
|
|
32292
32292
|
* @param [options.alpha = 1.0] - The alpha blending value of this layer, from 0.0 to 1.0.
|
|
32293
|
-
|
|
32294
|
-
|
|
32295
|
-
|
|
32296
|
-
|
|
32297
|
-
|
|
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.
|
|
32298
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.
|
|
32299
|
-
|
|
32300
|
-
|
|
32301
|
-
|
|
32302
|
-
|
|
32303
|
-
|
|
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>.
|
|
32304
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.
|
|
32305
|
-
|
|
32306
|
-
|
|
32307
|
-
|
|
32308
|
-
|
|
32309
|
-
|
|
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>.
|
|
32310
32310
|
* @param [options.brightness = 1.0] - The brightness of this layer. 1.0 uses the unmodified imagery
|
|
32311
|
-
|
|
32312
|
-
|
|
32313
|
-
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32317
|
-
|
|
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.
|
|
32318
32318
|
* @param [options.contrast = 1.0] - The contrast of this layer. 1.0 uses the unmodified imagery color.
|
|
32319
|
-
|
|
32320
|
-
|
|
32321
|
-
|
|
32322
|
-
|
|
32323
|
-
|
|
32324
|
-
|
|
32325
|
-
|
|
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.
|
|
32326
32326
|
* @param [options.hue = 0.0] - The hue of this layer. 0.0 uses the unmodified imagery color.
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
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.
|
|
32333
32333
|
* @param [options.saturation = 1.0] - The saturation of this layer. 1.0 uses the unmodified imagery color.
|
|
32334
|
-
|
|
32335
|
-
|
|
32336
|
-
|
|
32337
|
-
|
|
32338
|
-
|
|
32339
|
-
|
|
32340
|
-
|
|
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.
|
|
32341
32341
|
* @param [options.gamma = 1.0] - The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.
|
|
32342
|
-
|
|
32343
|
-
|
|
32344
|
-
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
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.
|
|
32348
32348
|
* @param [options.splitDirection = SplitDirection.NONE] - The {@link SplitDirection} split to apply to this layer.
|
|
32349
32349
|
* @param [options.minificationFilter = TextureMinificationFilter.LINEAR] - The
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32350
|
+
texture minification filter to apply to this layer. Possible values
|
|
32351
|
+
are <code>TextureMinificationFilter.LINEAR</code> and
|
|
32352
|
+
<code>TextureMinificationFilter.NEAREST</code>.
|
|
32353
32353
|
* @param [options.magnificationFilter = TextureMagnificationFilter.LINEAR] - The
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32354
|
+
texture minification filter to apply to this layer. Possible values
|
|
32355
|
+
are <code>TextureMagnificationFilter.LINEAR</code> and
|
|
32356
|
+
<code>TextureMagnificationFilter.NEAREST</code>.
|
|
32357
32357
|
* @param [options.show = true] - True if the layer is shown; otherwise, false.
|
|
32358
32358
|
* @param [options.maximumAnisotropy = maximum supported] - The maximum anisotropy level to use
|
|
32359
|
-
|
|
32360
|
-
|
|
32361
|
-
|
|
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.
|
|
32362
32362
|
* @param [options.minimumTerrainLevel] - The minimum terrain level-of-detail at which to show this imagery layer,
|
|
32363
|
-
|
|
32363
|
+
or undefined to show it at all levels. Level zero is the least-detailed level.
|
|
32364
32364
|
* @param [options.maximumTerrainLevel] - The maximum terrain level-of-detail at which to show this imagery layer,
|
|
32365
|
-
|
|
32365
|
+
or undefined to show it at all levels. Level zero is the least-detailed level.
|
|
32366
32366
|
* @param [options.cutoutRectangle] - Cartographic rectangle for cutting out a portion of this ImageryLayer.
|
|
32367
32367
|
* @param [options.colorToAlpha] - Color to be used as alpha.
|
|
32368
32368
|
* @param [options.colorToAlphaThreshold = 0.004] - Threshold for color-to-alpha.
|
|
@@ -32391,27 +32391,27 @@ export class ImageryLayer {
|
|
|
32391
32391
|
});
|
|
32392
32392
|
/**
|
|
32393
32393
|
* The alpha blending value of this layer, with 0.0 representing fully transparent and
|
|
32394
|
-
|
|
32394
|
+
1.0 representing fully opaque.
|
|
32395
32395
|
*/
|
|
32396
32396
|
alpha: number;
|
|
32397
32397
|
/**
|
|
32398
32398
|
* The alpha blending value of this layer on the night side of the globe, with 0.0 representing fully transparent and
|
|
32399
|
-
|
|
32399
|
+
1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is <code>true</code>.
|
|
32400
32400
|
*/
|
|
32401
32401
|
nightAlpha: number;
|
|
32402
32402
|
/**
|
|
32403
32403
|
* The alpha blending value of this layer on the day side of the globe, with 0.0 representing fully transparent and
|
|
32404
|
-
|
|
32404
|
+
1.0 representing fully opaque. This only takes effect when {@link Globe#enableLighting} is <code>true</code>.
|
|
32405
32405
|
*/
|
|
32406
32406
|
dayAlpha: number;
|
|
32407
32407
|
/**
|
|
32408
32408
|
* The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
32409
|
-
|
|
32409
|
+
makes the imagery darker while greater than 1.0 makes it brighter.
|
|
32410
32410
|
*/
|
|
32411
32411
|
brightness: number;
|
|
32412
32412
|
/**
|
|
32413
32413
|
* The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
32414
|
-
|
|
32414
|
+
the contrast while greater than 1.0 increases it.
|
|
32415
32415
|
*/
|
|
32416
32416
|
contrast: number;
|
|
32417
32417
|
/**
|
|
@@ -32420,7 +32420,7 @@ export class ImageryLayer {
|
|
|
32420
32420
|
hue: number;
|
|
32421
32421
|
/**
|
|
32422
32422
|
* The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
32423
|
-
|
|
32423
|
+
saturation while greater than 1.0 increases it.
|
|
32424
32424
|
*/
|
|
32425
32425
|
saturation: number;
|
|
32426
32426
|
/**
|
|
@@ -32433,20 +32433,20 @@ export class ImageryLayer {
|
|
|
32433
32433
|
splitDirection: SplitDirection;
|
|
32434
32434
|
/**
|
|
32435
32435
|
* The {@link TextureMinificationFilter} to apply to this layer.
|
|
32436
|
-
|
|
32437
|
-
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
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.
|
|
32441
32441
|
*/
|
|
32442
32442
|
minificationFilter: TextureMinificationFilter;
|
|
32443
32443
|
/**
|
|
32444
32444
|
* The {@link TextureMagnificationFilter} to apply to this layer.
|
|
32445
|
-
|
|
32446
|
-
|
|
32447
|
-
|
|
32448
|
-
|
|
32449
|
-
|
|
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.
|
|
32450
32450
|
*/
|
|
32451
32451
|
magnificationFilter: TextureMagnificationFilter;
|
|
32452
32452
|
/**
|
|
@@ -32471,92 +32471,92 @@ export class ImageryLayer {
|
|
|
32471
32471
|
readonly imageryProvider: ImageryProvider;
|
|
32472
32472
|
/**
|
|
32473
32473
|
* Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the
|
|
32474
|
-
|
|
32474
|
+
{@link ImageryProvider}, only a portion of the imagery provider is shown.
|
|
32475
32475
|
*/
|
|
32476
32476
|
readonly rectangle: Rectangle;
|
|
32477
32477
|
/**
|
|
32478
32478
|
* This value is used as the default brightness for the imagery layer if one is not provided during construction
|
|
32479
|
-
|
|
32479
|
+
or by the imagery provider. This value does not modify the brightness of the imagery.
|
|
32480
32480
|
*/
|
|
32481
32481
|
static DEFAULT_BRIGHTNESS: number;
|
|
32482
32482
|
/**
|
|
32483
32483
|
* This value is used as the default contrast for the imagery layer if one is not provided during construction
|
|
32484
|
-
|
|
32484
|
+
or by the imagery provider. This value does not modify the contrast of the imagery.
|
|
32485
32485
|
*/
|
|
32486
32486
|
static DEFAULT_CONTRAST: number;
|
|
32487
32487
|
/**
|
|
32488
32488
|
* This value is used as the default hue for the imagery layer if one is not provided during construction
|
|
32489
|
-
|
|
32489
|
+
or by the imagery provider. This value does not modify the hue of the imagery.
|
|
32490
32490
|
*/
|
|
32491
32491
|
static DEFAULT_HUE: number;
|
|
32492
32492
|
/**
|
|
32493
32493
|
* This value is used as the default saturation for the imagery layer if one is not provided during construction
|
|
32494
|
-
|
|
32494
|
+
or by the imagery provider. This value does not modify the saturation of the imagery.
|
|
32495
32495
|
*/
|
|
32496
32496
|
static DEFAULT_SATURATION: number;
|
|
32497
32497
|
/**
|
|
32498
32498
|
* This value is used as the default gamma for the imagery layer if one is not provided during construction
|
|
32499
|
-
|
|
32499
|
+
or by the imagery provider. This value does not modify the gamma of the imagery.
|
|
32500
32500
|
*/
|
|
32501
32501
|
static DEFAULT_GAMMA: number;
|
|
32502
32502
|
/**
|
|
32503
32503
|
* This value is used as the default split for the imagery layer if one is not provided during construction
|
|
32504
|
-
|
|
32504
|
+
or by the imagery provider.
|
|
32505
32505
|
*/
|
|
32506
32506
|
static DEFAULT_SPLIT: SplitDirection;
|
|
32507
32507
|
/**
|
|
32508
32508
|
* This value is used as the default texture minification filter for the imagery layer if one is not provided
|
|
32509
|
-
|
|
32509
|
+
during construction or by the imagery provider.
|
|
32510
32510
|
*/
|
|
32511
32511
|
static DEFAULT_MINIFICATION_FILTER: TextureMinificationFilter;
|
|
32512
32512
|
/**
|
|
32513
32513
|
* This value is used as the default texture magnification filter for the imagery layer if one is not provided
|
|
32514
|
-
|
|
32514
|
+
during construction or by the imagery provider.
|
|
32515
32515
|
*/
|
|
32516
32516
|
static DEFAULT_MAGNIFICATION_FILTER: TextureMagnificationFilter;
|
|
32517
32517
|
/**
|
|
32518
32518
|
* This value is used as the default threshold for color-to-alpha if one is not provided
|
|
32519
|
-
|
|
32519
|
+
during construction or by the imagery provider.
|
|
32520
32520
|
*/
|
|
32521
32521
|
static DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD: number;
|
|
32522
32522
|
/**
|
|
32523
32523
|
* Gets a value indicating whether this layer is the base layer in the
|
|
32524
|
-
|
|
32525
|
-
|
|
32526
|
-
|
|
32527
|
-
|
|
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.
|
|
32528
32528
|
* @returns true if this is the base layer; otherwise, false.
|
|
32529
32529
|
*/
|
|
32530
32530
|
isBaseLayer(): boolean;
|
|
32531
32531
|
/**
|
|
32532
32532
|
* Returns true if this object was destroyed; otherwise, false.
|
|
32533
|
-
|
|
32534
|
-
|
|
32535
|
-
|
|
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.
|
|
32536
32536
|
* @returns True if this object was destroyed; otherwise, false.
|
|
32537
32537
|
*/
|
|
32538
32538
|
isDestroyed(): boolean;
|
|
32539
32539
|
/**
|
|
32540
32540
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
32541
|
-
|
|
32542
|
-
|
|
32543
|
-
|
|
32544
|
-
|
|
32545
|
-
|
|
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.
|
|
32546
32546
|
* @example
|
|
32547
32547
|
* imageryLayer = imageryLayer && imageryLayer.destroy();
|
|
32548
32548
|
*/
|
|
32549
32549
|
destroy(): void;
|
|
32550
32550
|
/**
|
|
32551
32551
|
* Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle,
|
|
32552
|
-
|
|
32552
|
+
producing the overall bounds of imagery that can be produced by this layer.
|
|
32553
32553
|
* @example
|
|
32554
32554
|
* // Zoom to an imagery layer.
|
|
32555
|
-
|
|
32556
|
-
|
|
32557
|
-
|
|
32558
|
-
|
|
32559
|
-
|
|
32555
|
+
imageryLayer.getViewableRectangle().then(function (rectangle) {
|
|
32556
|
+
return camera.flyTo({
|
|
32557
|
+
destination: rectangle
|
|
32558
|
+
});
|
|
32559
|
+
});
|
|
32560
32560
|
* @returns A promise to a rectangle which defines the overall bounds of imagery that can be produced by this layer.
|
|
32561
32561
|
*/
|
|
32562
32562
|
getViewableRectangle(): Promise<Rectangle>;
|
|
@@ -34580,56 +34580,56 @@ export namespace MaterialAppearance {
|
|
|
34580
34580
|
|
|
34581
34581
|
/**
|
|
34582
34582
|
* A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
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
|
-
|
|
34626
|
-
|
|
34627
|
-
|
|
34628
|
-
|
|
34629
|
-
|
|
34630
|
-
|
|
34631
|
-
|
|
34632
|
-
|
|
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>
|
|
34633
34633
|
* @param [options] - Object with the following properties:
|
|
34634
34634
|
* @param [options.gltf] - A glTF JSON object, or a binary glTF buffer.
|
|
34635
34635
|
* @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
|
|
@@ -34721,30 +34721,30 @@ export class Model {
|
|
|
34721
34721
|
silhouetteSize: number;
|
|
34722
34722
|
/**
|
|
34723
34723
|
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
|
34724
|
-
|
|
34725
|
-
|
|
34726
|
-
|
|
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}.
|
|
34727
34727
|
* @example
|
|
34728
34728
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
34729
|
-
|
|
34729
|
+
m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
34730
34730
|
*/
|
|
34731
34731
|
modelMatrix: Matrix4;
|
|
34732
34732
|
/**
|
|
34733
34733
|
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
|
|
34734
|
-
|
|
34735
|
-
|
|
34734
|
+
Values greater than <code>1.0</code> increase the size of the model; values
|
|
34735
|
+
less than <code>1.0</code> decrease.
|
|
34736
34736
|
*/
|
|
34737
34737
|
scale: number;
|
|
34738
34738
|
/**
|
|
34739
34739
|
* The approximate minimum pixel size of the model regardless of zoom.
|
|
34740
|
-
|
|
34741
|
-
|
|
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.
|
|
34742
34742
|
*/
|
|
34743
34743
|
minimumPixelSize: number;
|
|
34744
34744
|
/**
|
|
34745
34745
|
* The maximum scale size for a model. This can be used to give
|
|
34746
|
-
|
|
34747
|
-
|
|
34746
|
+
an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
|
|
34747
|
+
is never an unreasonable scale.
|
|
34748
34748
|
*/
|
|
34749
34749
|
maximumScale: number;
|
|
34750
34750
|
/**
|
|
@@ -34777,21 +34777,21 @@ export class Model {
|
|
|
34777
34777
|
colorBlendMode: ColorBlendMode;
|
|
34778
34778
|
/**
|
|
34779
34779
|
* Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>.
|
|
34780
|
-
|
|
34781
|
-
|
|
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.
|
|
34782
34782
|
*/
|
|
34783
34783
|
colorBlendAmount: number;
|
|
34784
34784
|
/**
|
|
34785
34785
|
* Whether to cull back-facing geometry. When true, back face culling is
|
|
34786
|
-
|
|
34787
|
-
|
|
34788
|
-
|
|
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.
|
|
34789
34789
|
*/
|
|
34790
34790
|
backFaceCulling: boolean;
|
|
34791
34791
|
/**
|
|
34792
34792
|
* Whether to display the outline for models using the
|
|
34793
|
-
|
|
34794
|
-
|
|
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.
|
|
34795
34795
|
*/
|
|
34796
34796
|
readonly showOutline: boolean;
|
|
34797
34797
|
/**
|
|
@@ -34800,66 +34800,66 @@ export class Model {
|
|
|
34800
34800
|
splitDirection: SplitDirection;
|
|
34801
34801
|
/**
|
|
34802
34802
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
34803
|
-
|
|
34804
|
-
|
|
34805
|
-
|
|
34806
|
-
|
|
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>
|
|
34807
34807
|
*/
|
|
34808
34808
|
debugShowBoundingVolume: boolean;
|
|
34809
34809
|
/**
|
|
34810
34810
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
34811
|
-
|
|
34812
|
-
|
|
34813
|
-
|
|
34811
|
+
<p>
|
|
34812
|
+
Draws the model in wireframe.
|
|
34813
|
+
</p>
|
|
34814
34814
|
*/
|
|
34815
34815
|
debugWireframe: boolean;
|
|
34816
34816
|
/**
|
|
34817
34817
|
* The object for the glTF JSON, including properties with default values omitted
|
|
34818
|
-
|
|
34818
|
+
from the JSON provided to this model.
|
|
34819
34819
|
*/
|
|
34820
34820
|
readonly gltf: any;
|
|
34821
34821
|
/**
|
|
34822
34822
|
* The base path that paths in the glTF JSON are relative to. The base
|
|
34823
|
-
|
|
34824
|
-
|
|
34825
|
-
|
|
34826
|
-
|
|
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.
|
|
34827
34827
|
*/
|
|
34828
34828
|
readonly basePath: string;
|
|
34829
34829
|
/**
|
|
34830
34830
|
* The model's bounding sphere in its local coordinate system. This does not take into
|
|
34831
|
-
|
|
34831
|
+
account glTF animations and skins nor does it take into account {@link Model#minimumPixelSize}.
|
|
34832
34832
|
* @example
|
|
34833
34833
|
* // Center in WGS84 coordinates
|
|
34834
|
-
|
|
34834
|
+
const center = Cesium.Matrix4.multiplyByPoint(model.modelMatrix, model.boundingSphere.center, new Cesium.Cartesian3());
|
|
34835
34835
|
*/
|
|
34836
34836
|
readonly boundingSphere: BoundingSphere;
|
|
34837
34837
|
/**
|
|
34838
34838
|
* When <code>true</code>, this model is ready to render, i.e., the external binary, image,
|
|
34839
|
-
|
|
34840
|
-
|
|
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.
|
|
34841
34841
|
*/
|
|
34842
34842
|
readonly ready: boolean;
|
|
34843
34843
|
/**
|
|
34844
34844
|
* Gets the promise that will be resolved when this model is ready to render, i.e., when the external binary, image,
|
|
34845
|
-
|
|
34846
|
-
|
|
34847
|
-
|
|
34848
|
-
|
|
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>
|
|
34849
34849
|
* @example
|
|
34850
34850
|
* // Play all animations at half-speed when the model is ready to render
|
|
34851
|
-
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
|
|
34855
|
-
|
|
34856
|
-
|
|
34857
|
-
|
|
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
|
+
});
|
|
34858
34858
|
*/
|
|
34859
34859
|
readonly readyPromise: Promise<Model>;
|
|
34860
34860
|
/**
|
|
34861
34861
|
* Determines if model WebGL resource creation will be spread out over several frames or
|
|
34862
|
-
|
|
34862
|
+
block until completion once all glTF files are loaded.
|
|
34863
34863
|
*/
|
|
34864
34864
|
readonly asynchronous: boolean;
|
|
34865
34865
|
/**
|
|
@@ -34884,10 +34884,10 @@ export class Model {
|
|
|
34884
34884
|
clippingPlanes: ClippingPlaneCollection;
|
|
34885
34885
|
/**
|
|
34886
34886
|
* The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
|
34887
|
-
|
|
34888
|
-
|
|
34889
|
-
|
|
34890
|
-
|
|
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>
|
|
34891
34891
|
*/
|
|
34892
34892
|
lightColor: Cartesian3;
|
|
34893
34893
|
/**
|
|
@@ -34896,25 +34896,25 @@ export class Model {
|
|
|
34896
34896
|
imageBasedLighting: ImageBasedLighting;
|
|
34897
34897
|
/**
|
|
34898
34898
|
* Cesium adds lighting from the earth, sky, atmosphere, and star skybox. This cartesian is used to scale the final
|
|
34899
|
-
|
|
34899
|
+
diffuse and specular lighting contribution from those sources to the final color. A value of 0.0 will disable those light sources.
|
|
34900
34900
|
*/
|
|
34901
34901
|
imageBasedLightingFactor: Cartesian2;
|
|
34902
34902
|
/**
|
|
34903
34903
|
* The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
|
|
34904
|
-
|
|
34904
|
+
This is used when {@link Model#specularEnvironmentMaps} and {@link Model#sphericalHarmonicCoefficients} are not defined.
|
|
34905
34905
|
*/
|
|
34906
34906
|
luminanceAtZenith: number;
|
|
34907
34907
|
/**
|
|
34908
34908
|
* The third order spherical harmonic coefficients used for the diffuse color of image-based lighting. When <code>undefined</code>, a diffuse irradiance
|
|
34909
|
-
|
|
34910
|
-
|
|
34911
|
-
|
|
34912
|
-
|
|
34913
|
-
|
|
34914
|
-
|
|
34915
|
-
|
|
34916
|
-
|
|
34917
|
-
|
|
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}.
|
|
34918
34918
|
*/
|
|
34919
34919
|
sphericalHarmonicCoefficients: Cartesian3[];
|
|
34920
34920
|
/**
|
|
@@ -34937,71 +34937,71 @@ export class Model {
|
|
|
34937
34937
|
static silhouetteSupported(scene: Scene): boolean;
|
|
34938
34938
|
/**
|
|
34939
34939
|
* <p>
|
|
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
|
-
|
|
34972
|
-
|
|
34973
|
-
|
|
34974
|
-
|
|
34975
|
-
|
|
34976
|
-
|
|
34977
|
-
|
|
34978
|
-
|
|
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>
|
|
34979
34979
|
* @example
|
|
34980
34980
|
* // Example 1. Create a model from a glTF asset
|
|
34981
|
-
|
|
34982
|
-
|
|
34983
|
-
|
|
34981
|
+
const model = scene.primitives.add(Cesium.Model.fromGltf({
|
|
34982
|
+
url : './duck/duck.gltf'
|
|
34983
|
+
}));
|
|
34984
34984
|
* @example
|
|
34985
34985
|
* // Example 2. Create model and provide all properties and events
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
34990
|
-
|
|
34991
|
-
|
|
34992
|
-
|
|
34993
|
-
|
|
34994
|
-
|
|
34995
|
-
|
|
34996
|
-
|
|
34997
|
-
|
|
34998
|
-
|
|
34999
|
-
|
|
35000
|
-
|
|
35001
|
-
|
|
35002
|
-
|
|
35003
|
-
|
|
35004
|
-
|
|
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
|
+
});
|
|
35005
35005
|
* @param options - Object with the following properties:
|
|
35006
35006
|
* @param options.url - The url to the .gltf file.
|
|
35007
35007
|
* @param [options.basePath] - The base path that paths in the glTF JSON are relative to.
|
|
@@ -35079,11 +35079,11 @@ export class Model {
|
|
|
35079
35079
|
}): Model;
|
|
35080
35080
|
/**
|
|
35081
35081
|
* Returns the glTF node with the given <code>name</code> property. This is used to
|
|
35082
|
-
|
|
35082
|
+
modify a node's transform for animation outside of glTF animations.
|
|
35083
35083
|
* @example
|
|
35084
35084
|
* // Apply non-uniform scale to node LOD3sp
|
|
35085
|
-
|
|
35086
|
-
|
|
35085
|
+
const node = model.getNode('LOD3sp');
|
|
35086
|
+
node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
|
|
35087
35087
|
* @param name - The glTF name of the node.
|
|
35088
35088
|
* @returns The node or <code>undefined</code> if no node with <code>name</code> exists.
|
|
35089
35089
|
*/
|
|
@@ -35102,40 +35102,40 @@ export class Model {
|
|
|
35102
35102
|
getMaterial(name: string): ModelMaterial;
|
|
35103
35103
|
/**
|
|
35104
35104
|
* Sets the current value of an articulation stage. After setting one or multiple stage values, call
|
|
35105
|
-
|
|
35105
|
+
Model.applyArticulations() to cause the node matrices to be recalculated.
|
|
35106
35106
|
* @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
|
|
35107
35107
|
* @param value - The numeric value of this stage of the articulation.
|
|
35108
35108
|
*/
|
|
35109
35109
|
setArticulationStage(articulationStageKey: string, value: number): void;
|
|
35110
35110
|
/**
|
|
35111
35111
|
* Applies any modified articulation stages to the matrix of each node that participates
|
|
35112
|
-
|
|
35112
|
+
in any articulation. Note that this will overwrite any nodeTransformations on participating nodes.
|
|
35113
35113
|
*/
|
|
35114
35114
|
applyArticulations(): void;
|
|
35115
35115
|
/**
|
|
35116
35116
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
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>
|
|
35122
35122
|
*/
|
|
35123
35123
|
update(): void;
|
|
35124
35124
|
/**
|
|
35125
35125
|
* Returns true if this object was destroyed; otherwise, false.
|
|
35126
|
-
|
|
35127
|
-
|
|
35128
|
-
|
|
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.
|
|
35129
35129
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
35130
35130
|
*/
|
|
35131
35131
|
isDestroyed(): boolean;
|
|
35132
35132
|
/**
|
|
35133
35133
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
35134
|
-
|
|
35135
|
-
|
|
35136
|
-
|
|
35137
|
-
|
|
35138
|
-
|
|
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.
|
|
35139
35139
|
* @example
|
|
35140
35140
|
* model = model && model.destroy();
|
|
35141
35141
|
*/
|