mars3d-cesium 1.92.0 → 1.92.1
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 +586 -579
- package/Build/Cesium/Cesium.js +8 -8
- package/Build/Cesium/ThirdParty/Workers/draco_decoder_nodejs.js +114 -115
- package/Build/Cesium/ThirdParty/draco_decoder.wasm +0 -0
- package/LICENSE.md +1187 -1187
- package/package.json +3 -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
|
-
const viewer = new Cesium.Viewer('cesiumContainer', {
|
|
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
|
/**
|
|
@@ -21469,76 +21469,92 @@ export class KmlCamera {
|
|
|
21469
21469
|
export namespace KmlDataSource {
|
|
21470
21470
|
/**
|
|
21471
21471
|
* Initialization options for the `load` method.
|
|
21472
|
-
* @property camera - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21473
|
-
* @property canvas - The canvas that is used for sending viewer properties to network links.
|
|
21474
21472
|
* @property [sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21475
21473
|
* @property [clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
|
|
21476
21474
|
* @property [ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21477
|
-
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
21478
21475
|
* @property [screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21479
21476
|
*/
|
|
21480
21477
|
type LoadOptions = {
|
|
21481
|
-
camera: Camera;
|
|
21482
|
-
canvas: HTMLCanvasElement;
|
|
21483
21478
|
sourceUri?: string;
|
|
21484
21479
|
clampToGround?: boolean;
|
|
21485
21480
|
ellipsoid?: Ellipsoid;
|
|
21481
|
+
screenOverlayContainer?: Element | string;
|
|
21482
|
+
};
|
|
21483
|
+
/**
|
|
21484
|
+
* Options for constructing a new KmlDataSource, or calling the static `load` method.
|
|
21485
|
+
* @property [camera] - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21486
|
+
* @property [canvas] - The canvas that is used for sending viewer properties to network links.
|
|
21487
|
+
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
21488
|
+
* @property [sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21489
|
+
* @property [clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
|
|
21490
|
+
* @property [ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21491
|
+
* @property [screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21492
|
+
*/
|
|
21493
|
+
type ConstructorOptions = {
|
|
21494
|
+
camera?: Camera;
|
|
21495
|
+
canvas?: HTMLCanvasElement;
|
|
21486
21496
|
credit?: Credit | string;
|
|
21497
|
+
sourceUri?: string;
|
|
21498
|
+
clampToGround?: boolean;
|
|
21499
|
+
ellipsoid?: Ellipsoid;
|
|
21487
21500
|
screenOverlayContainer?: Element | string;
|
|
21488
21501
|
};
|
|
21489
21502
|
}
|
|
21490
21503
|
|
|
21491
21504
|
/**
|
|
21492
21505
|
* A {@link DataSource} which processes Keyhole Markup Language 2.2 (KML).
|
|
21493
|
-
<p>
|
|
21494
|
-
KML support in Cesium is incomplete, but a large amount of the standard,
|
|
21495
|
-
as well as Google's <code>gx</code> extension namespace, is supported. See Github issue
|
|
21496
|
-
{@link https://github.com/CesiumGS/cesium/issues/873|#873} for a
|
|
21497
|
-
detailed list of what is and isn't supported. Cesium will also write information to the
|
|
21498
|
-
console when it encounters most unsupported features.
|
|
21499
|
-
</p>
|
|
21500
|
-
<p>
|
|
21501
|
-
Non visual feature data, such as <code>atom:author</code> and <code>ExtendedData</code>
|
|
21502
|
-
is exposed via an instance of {@link KmlFeatureData}, which is added to each {@link Entity}
|
|
21503
|
-
under the <code>kml</code> property.
|
|
21504
|
-
</p>
|
|
21506
|
+
* <p>
|
|
21507
|
+
* KML support in Cesium is incomplete, but a large amount of the standard,
|
|
21508
|
+
* as well as Google's <code>gx</code> extension namespace, is supported. See Github issue
|
|
21509
|
+
* {@link https://github.com/CesiumGS/cesium/issues/873|#873} for a
|
|
21510
|
+
* detailed list of what is and isn't supported. Cesium will also write information to the
|
|
21511
|
+
* console when it encounters most unsupported features.
|
|
21512
|
+
* </p>
|
|
21513
|
+
* <p>
|
|
21514
|
+
* Non visual feature data, such as <code>atom:author</code> and <code>ExtendedData</code>
|
|
21515
|
+
* is exposed via an instance of {@link KmlFeatureData}, which is added to each {@link Entity}
|
|
21516
|
+
* under the <code>kml</code> property.
|
|
21517
|
+
* </p>
|
|
21505
21518
|
* @example
|
|
21506
21519
|
* const viewer = new Cesium.Viewer('cesiumContainer');
|
|
21507
|
-
viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/facilities.kmz',
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
);
|
|
21513
|
-
* @param options -
|
|
21514
|
-
* @param options.camera - The camera that is used for viewRefreshModes and sending camera properties to network links.
|
|
21515
|
-
* @param options.canvas - The canvas that is used for sending viewer properties to network links.
|
|
21516
|
-
* @param [options.ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21517
|
-
* @param [options.credit] - A credit for the data source, which is displayed on the canvas.
|
|
21520
|
+
* viewer.dataSources.add(Cesium.KmlDataSource.load('../../SampleData/facilities.kmz',
|
|
21521
|
+
* {
|
|
21522
|
+
* camera: viewer.scene.camera,
|
|
21523
|
+
* canvas: viewer.scene.canvas
|
|
21524
|
+
* })
|
|
21525
|
+
* );
|
|
21526
|
+
* @param [options] - Object describing initialization options
|
|
21518
21527
|
*/
|
|
21519
21528
|
export class KmlDataSource {
|
|
21520
|
-
constructor(options
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21529
|
+
constructor(options?: KmlDataSource.ConstructorOptions);
|
|
21530
|
+
/**
|
|
21531
|
+
* The current size of this Canvas will be used to populate the Link parameters
|
|
21532
|
+
* for client height and width.
|
|
21533
|
+
*/
|
|
21534
|
+
canvas: HTMLCanvasElement | undefined;
|
|
21535
|
+
/**
|
|
21536
|
+
* The position and orientation of this {@link Camera} will be used to
|
|
21537
|
+
* populate various camera parameters when making network requests.
|
|
21538
|
+
* Camera movement will determine when to trigger NetworkLink refresh if
|
|
21539
|
+
* <code>viewRefreshMode</code> is <code>onStop</code>.
|
|
21540
|
+
*/
|
|
21541
|
+
camera: Camera | undefined;
|
|
21526
21542
|
/**
|
|
21527
21543
|
* Creates a Promise to a new instance loaded with the provided KML data.
|
|
21528
21544
|
* @param data - A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
21529
21545
|
* @param [options] - An object specifying configuration options
|
|
21530
21546
|
* @returns A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
|
|
21531
21547
|
*/
|
|
21532
|
-
static load(data: Resource | string | Document | Blob, options?: KmlDataSource.
|
|
21548
|
+
static load(data: Resource | string | Document | Blob, options?: KmlDataSource.ConstructorOptions): Promise<KmlDataSource>;
|
|
21533
21549
|
/**
|
|
21534
21550
|
* Gets or sets a human-readable name for this instance.
|
|
21535
|
-
|
|
21551
|
+
* This will be automatically be set to the KML document name on load.
|
|
21536
21552
|
*/
|
|
21537
21553
|
name: string;
|
|
21538
21554
|
/**
|
|
21539
21555
|
* Gets the clock settings defined by the loaded KML. This represents the total
|
|
21540
|
-
|
|
21541
|
-
|
|
21556
|
+
* availability interval for all time-dynamic data. If the KML does not contain
|
|
21557
|
+
* time-dynamic data, this value is undefined.
|
|
21542
21558
|
*/
|
|
21543
21559
|
clock: DataSourceClock;
|
|
21544
21560
|
/**
|
|
@@ -21588,19 +21604,10 @@ export class KmlDataSource {
|
|
|
21588
21604
|
/**
|
|
21589
21605
|
* Asynchronously loads the provided KML data, replacing any existing data.
|
|
21590
21606
|
* @param data - A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
21591
|
-
* @param [options] - An object
|
|
21592
|
-
* @param [options.sourceUri] - Overrides the url to use for resolving relative links and other KML network features.
|
|
21593
|
-
* @param [options.clampToGround = false] - true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground. If true, lines will use corridors so use Entity.corridor instead of Entity.polyline.
|
|
21594
|
-
* @param [options.ellipsoid = Ellipsoid.WGS84] - The global ellipsoid used for geographical calculations.
|
|
21595
|
-
* @param [options.screenOverlayContainer] - A container for ScreenOverlay images.
|
|
21607
|
+
* @param [options] - An object specifying configuration options
|
|
21596
21608
|
* @returns A promise that will resolve to this instances once the KML is loaded.
|
|
21597
21609
|
*/
|
|
21598
|
-
load(data: Resource | string | Document | Blob, options?:
|
|
21599
|
-
sourceUri?: Resource | string;
|
|
21600
|
-
clampToGround?: boolean;
|
|
21601
|
-
ellipsoid?: Ellipsoid;
|
|
21602
|
-
screenOverlayContainer?: Element | string;
|
|
21603
|
-
}): Promise<KmlDataSource>;
|
|
21610
|
+
load(data: Resource | string | Document | Blob, options?: KmlDataSource.LoadOptions): Promise<KmlDataSource>;
|
|
21604
21611
|
/**
|
|
21605
21612
|
* Cleans up any non-entity elements created by the data source. Currently this only affects ScreenOverlay elements.
|
|
21606
21613
|
*/
|
|
@@ -21640,8 +21647,8 @@ export class KmlFeatureData {
|
|
|
21640
21647
|
snippet: string;
|
|
21641
21648
|
/**
|
|
21642
21649
|
* Gets the extended data, parsed into a JSON object.
|
|
21643
|
-
|
|
21644
|
-
|
|
21650
|
+
* Currently only the <code>Data</code> property is supported.
|
|
21651
|
+
* <code>SchemaData</code> and custom data are ignored.
|
|
21645
21652
|
*/
|
|
21646
21653
|
extendedData: string;
|
|
21647
21654
|
}
|
|
@@ -22289,7 +22296,7 @@ export class ModelVisualizer {
|
|
|
22289
22296
|
constructor(scene: Scene, entityCollection: EntityCollection);
|
|
22290
22297
|
/**
|
|
22291
22298
|
* Updates models created this visualizer to match their
|
|
22292
|
-
|
|
22299
|
+
* Entity counterpart at the given time.
|
|
22293
22300
|
* @param time - The time to update to.
|
|
22294
22301
|
* @returns This function always returns true.
|
|
22295
22302
|
*/
|
|
@@ -25216,19 +25223,19 @@ export enum Axis {
|
|
|
25216
25223
|
|
|
25217
25224
|
/**
|
|
25218
25225
|
* A viewport-aligned image positioned in the 3D scene, that is created
|
|
25219
|
-
and rendered using a {@link BillboardCollection}. A billboard is created and its initial
|
|
25220
|
-
properties are set by calling {@link BillboardCollection#add}.
|
|
25221
|
-
<br /><br />
|
|
25222
|
-
<div align='center'>
|
|
25223
|
-
<img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
25224
|
-
Example billboards
|
|
25225
|
-
</div>
|
|
25226
|
+
* and rendered using a {@link BillboardCollection}. A billboard is created and its initial
|
|
25227
|
+
* properties are set by calling {@link BillboardCollection#add}.
|
|
25228
|
+
* <br /><br />
|
|
25229
|
+
* <div align='center'>
|
|
25230
|
+
* <img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
25231
|
+
* Example billboards
|
|
25232
|
+
* </div>
|
|
25226
25233
|
*/
|
|
25227
25234
|
export class Billboard {
|
|
25228
25235
|
constructor();
|
|
25229
25236
|
/**
|
|
25230
25237
|
* Determines if this billboard will be shown. Use this to hide or show a billboard, instead
|
|
25231
|
-
|
|
25238
|
+
* of removing it and re-adding it to the collection.
|
|
25232
25239
|
*/
|
|
25233
25240
|
show: boolean;
|
|
25234
25241
|
/**
|
|
@@ -25241,159 +25248,159 @@ export class Billboard {
|
|
|
25241
25248
|
heightReference: HeightReference;
|
|
25242
25249
|
/**
|
|
25243
25250
|
* Gets or sets the pixel offset in screen space from the origin of this billboard. This is commonly used
|
|
25244
|
-
|
|
25245
|
-
|
|
25246
|
-
|
|
25247
|
-
|
|
25248
|
-
|
|
25249
|
-
|
|
25250
|
-
|
|
25251
|
-
|
|
25252
|
-
|
|
25253
|
-
|
|
25254
|
-
|
|
25251
|
+
* to align multiple billboards and labels at the same position, e.g., an image and text. The
|
|
25252
|
+
* screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
25253
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
25254
|
+
* <br /><br />
|
|
25255
|
+
* <div align='center'>
|
|
25256
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25257
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setPixelOffset.default.png' width='250' height='188' /></td>
|
|
25258
|
+
* <td align='center'><code>b.pixeloffset = new Cartesian2(50, 25);</code><br/><img src='Images/Billboard.setPixelOffset.x50y-25.png' width='250' height='188' /></td>
|
|
25259
|
+
* </tr></table>
|
|
25260
|
+
* The billboard's origin is indicated by the yellow point.
|
|
25261
|
+
* </div>
|
|
25255
25262
|
*/
|
|
25256
25263
|
pixelOffset: Cartesian2;
|
|
25257
25264
|
/**
|
|
25258
25265
|
* Gets or sets near and far scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25259
|
-
|
|
25260
|
-
|
|
25261
|
-
|
|
25262
|
-
|
|
25263
|
-
|
|
25266
|
+
* A billboard's scale will interpolate between the {@link NearFarScalar#nearValue} and
|
|
25267
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25268
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25269
|
+
* Outside of these ranges the billboard's scale remains clamped to the nearest bound. If undefined,
|
|
25270
|
+
* scaleByDistance will be disabled.
|
|
25264
25271
|
* @example
|
|
25265
25272
|
* // Example 1.
|
|
25266
|
-
|
|
25267
|
-
|
|
25268
|
-
|
|
25269
|
-
|
|
25273
|
+
* // Set a billboard's scaleByDistance to scale by 1.5 when the
|
|
25274
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
25275
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
25276
|
+
* b.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
|
|
25270
25277
|
* @example
|
|
25271
25278
|
* // Example 2.
|
|
25272
|
-
|
|
25273
|
-
|
|
25279
|
+
* // disable scaling by distance
|
|
25280
|
+
* b.scaleByDistance = undefined;
|
|
25274
25281
|
*/
|
|
25275
25282
|
scaleByDistance: NearFarScalar;
|
|
25276
25283
|
/**
|
|
25277
25284
|
* Gets or sets near and far translucency properties of a Billboard based on the billboard's distance from the camera.
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25281
|
-
|
|
25282
|
-
|
|
25285
|
+
* A billboard's translucency will interpolate between the {@link NearFarScalar#nearValue} and
|
|
25286
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25287
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25288
|
+
* Outside of these ranges the billboard's translucency remains clamped to the nearest bound. If undefined,
|
|
25289
|
+
* translucencyByDistance will be disabled.
|
|
25283
25290
|
* @example
|
|
25284
25291
|
* // Example 1.
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25292
|
+
* // Set a billboard's translucency to 1.0 when the
|
|
25293
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
25294
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
25295
|
+
* b.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
|
|
25289
25296
|
* @example
|
|
25290
25297
|
* // Example 2.
|
|
25291
|
-
|
|
25292
|
-
|
|
25298
|
+
* // disable translucency by distance
|
|
25299
|
+
* b.translucencyByDistance = undefined;
|
|
25293
25300
|
*/
|
|
25294
25301
|
translucencyByDistance: NearFarScalar;
|
|
25295
25302
|
/**
|
|
25296
25303
|
* Gets or sets near and far pixel offset scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
25297
|
-
|
|
25298
|
-
|
|
25299
|
-
|
|
25300
|
-
|
|
25301
|
-
|
|
25304
|
+
* A billboard's pixel offset will be scaled between the {@link NearFarScalar#nearValue} and
|
|
25305
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
25306
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
25307
|
+
* Outside of these ranges the billboard's pixel offset scale remains clamped to the nearest bound. If undefined,
|
|
25308
|
+
* pixelOffsetScaleByDistance will be disabled.
|
|
25302
25309
|
* @example
|
|
25303
25310
|
* // Example 1.
|
|
25304
|
-
|
|
25305
|
-
|
|
25306
|
-
|
|
25307
|
-
|
|
25308
|
-
|
|
25311
|
+
* // Set a billboard's pixel offset scale to 0.0 when the
|
|
25312
|
+
* // camera is 1500 meters from the billboard and scale pixel offset to 10.0 pixels
|
|
25313
|
+
* // in the y direction the camera distance approaches 8.0e6 meters.
|
|
25314
|
+
* b.pixelOffset = new Cesium.Cartesian2(0.0, 1.0);
|
|
25315
|
+
* b.pixelOffsetScaleByDistance = new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
|
|
25309
25316
|
* @example
|
|
25310
25317
|
* // Example 2.
|
|
25311
|
-
|
|
25312
|
-
|
|
25318
|
+
* // disable pixel offset by distance
|
|
25319
|
+
* b.pixelOffsetScaleByDistance = undefined;
|
|
25313
25320
|
*/
|
|
25314
25321
|
pixelOffsetScaleByDistance: NearFarScalar;
|
|
25315
25322
|
/**
|
|
25316
25323
|
* Gets or sets the 3D Cartesian offset applied to this billboard in eye coordinates. Eye coordinates is a left-handed
|
|
25317
|
-
|
|
25318
|
-
|
|
25319
|
-
|
|
25320
|
-
|
|
25321
|
-
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
|
|
25325
|
-
|
|
25326
|
-
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
|
|
25330
|
-
|
|
25331
|
-
|
|
25332
|
-
|
|
25333
|
-
|
|
25324
|
+
* coordinate system, where <code>x</code> points towards the viewer's right, <code>y</code> points up, and
|
|
25325
|
+
* <code>z</code> points into the screen. Eye coordinates use the same scale as world and model coordinates,
|
|
25326
|
+
* which is typically meters.
|
|
25327
|
+
* <br /><br />
|
|
25328
|
+
* An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to
|
|
25329
|
+
* arrange a billboard above its corresponding 3D model.
|
|
25330
|
+
* <br /><br />
|
|
25331
|
+
* Below, the billboard is positioned at the center of the Earth but an eye offset makes it always
|
|
25332
|
+
* appear on top of the Earth regardless of the viewer's or Earth's orientation.
|
|
25333
|
+
* <br /><br />
|
|
25334
|
+
* <div align='center'>
|
|
25335
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25336
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.one.png' width='250' height='188' /></td>
|
|
25337
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.two.png' width='250' height='188' /></td>
|
|
25338
|
+
* </tr></table>
|
|
25339
|
+
* <code>b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);</code><br /><br />
|
|
25340
|
+
* </div>
|
|
25334
25341
|
*/
|
|
25335
25342
|
eyeOffset: Cartesian3;
|
|
25336
25343
|
/**
|
|
25337
25344
|
* Gets or sets the horizontal origin of this billboard, which determines if the billboard is
|
|
25338
|
-
|
|
25339
|
-
|
|
25340
|
-
|
|
25341
|
-
|
|
25342
|
-
|
|
25345
|
+
* to the left, center, or right of its anchor position.
|
|
25346
|
+
* <br /><br />
|
|
25347
|
+
* <div align='center'>
|
|
25348
|
+
* <img src='Images/Billboard.setHorizontalOrigin.png' width='648' height='196' /><br />
|
|
25349
|
+
* </div>
|
|
25343
25350
|
* @example
|
|
25344
25351
|
* // Use a bottom, left origin
|
|
25345
|
-
|
|
25346
|
-
|
|
25352
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
25353
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
25347
25354
|
*/
|
|
25348
25355
|
horizontalOrigin: HorizontalOrigin;
|
|
25349
25356
|
/**
|
|
25350
25357
|
* Gets or sets the vertical origin of this billboard, which determines if the billboard is
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25355
|
-
|
|
25358
|
+
* to the above, below, or at the center of its anchor position.
|
|
25359
|
+
* <br /><br />
|
|
25360
|
+
* <div align='center'>
|
|
25361
|
+
* <img src='Images/Billboard.setVerticalOrigin.png' width='695' height='175' /><br />
|
|
25362
|
+
* </div>
|
|
25356
25363
|
* @example
|
|
25357
25364
|
* // Use a bottom, left origin
|
|
25358
|
-
|
|
25359
|
-
|
|
25365
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
25366
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
25360
25367
|
*/
|
|
25361
25368
|
verticalOrigin: VerticalOrigin;
|
|
25362
25369
|
/**
|
|
25363
25370
|
* Gets or sets the uniform scale that is multiplied with the billboard's image size in pixels.
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25371
|
+
* A scale of <code>1.0</code> does not change the size of the billboard; a scale greater than
|
|
25372
|
+
* <code>1.0</code> enlarges the billboard; a positive scale less than <code>1.0</code> shrinks
|
|
25373
|
+
* the billboard.
|
|
25374
|
+
* <br /><br />
|
|
25375
|
+
* <div align='center'>
|
|
25376
|
+
* <img src='Images/Billboard.setScale.png' width='400' height='300' /><br/>
|
|
25377
|
+
* From left to right in the above image, the scales are <code>0.5</code>, <code>1.0</code>,
|
|
25378
|
+
* and <code>2.0</code>.
|
|
25379
|
+
* </div>
|
|
25373
25380
|
*/
|
|
25374
25381
|
scale: number;
|
|
25375
25382
|
/**
|
|
25376
25383
|
* Gets or sets the color that is multiplied with the billboard's texture. This has two common use cases. First,
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
|
|
25387
|
-
|
|
25388
|
-
|
|
25389
|
-
|
|
25390
|
-
|
|
25384
|
+
* the same white texture may be used by many different billboards, each with a different color, to create
|
|
25385
|
+
* colored billboards. Second, the color's alpha component can be used to make the billboard translucent as shown below.
|
|
25386
|
+
* An alpha of <code>0.0</code> makes the billboard transparent, and <code>1.0</code> makes the billboard opaque.
|
|
25387
|
+
* <br /><br />
|
|
25388
|
+
* <div align='center'>
|
|
25389
|
+
* <table border='0' cellpadding='5'><tr>
|
|
25390
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setColor.Alpha255.png' width='250' height='188' /></td>
|
|
25391
|
+
* <td align='center'><code>alpha : 0.5</code><br/><img src='Images/Billboard.setColor.Alpha127.png' width='250' height='188' /></td>
|
|
25392
|
+
* </tr></table>
|
|
25393
|
+
* </div>
|
|
25394
|
+
* <br />
|
|
25395
|
+
* The red, green, blue, and alpha values are indicated by <code>value</code>'s <code>red</code>, <code>green</code>,
|
|
25396
|
+
* <code>blue</code>, and <code>alpha</code> properties as shown in Example 1. These components range from <code>0.0</code>
|
|
25397
|
+
* (no intensity) to <code>1.0</code> (full intensity).
|
|
25391
25398
|
* @example
|
|
25392
25399
|
* // Example 1. Assign yellow.
|
|
25393
|
-
|
|
25400
|
+
* b.color = Cesium.Color.YELLOW;
|
|
25394
25401
|
* @example
|
|
25395
25402
|
* // Example 2. Make a billboard 50% translucent.
|
|
25396
|
-
|
|
25403
|
+
* b.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
|
|
25397
25404
|
*/
|
|
25398
25405
|
color: Color;
|
|
25399
25406
|
/**
|
|
@@ -25402,20 +25409,20 @@ export class Billboard {
|
|
|
25402
25409
|
rotation: number;
|
|
25403
25410
|
/**
|
|
25404
25411
|
* Gets or sets the aligned axis in world space. The aligned axis is the unit vector that the billboard up vector points towards.
|
|
25405
|
-
|
|
25412
|
+
* The default is the zero vector, which means the billboard is aligned to the screen up vector.
|
|
25406
25413
|
* @example
|
|
25407
25414
|
* // Example 1.
|
|
25408
|
-
|
|
25409
|
-
|
|
25415
|
+
* // Have the billboard up vector point north
|
|
25416
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
25410
25417
|
* @example
|
|
25411
25418
|
* // Example 2.
|
|
25412
|
-
|
|
25413
|
-
|
|
25414
|
-
|
|
25419
|
+
* // Have the billboard point east.
|
|
25420
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
25421
|
+
* billboard.rotation = -Cesium.Math.PI_OVER_TWO;
|
|
25415
25422
|
* @example
|
|
25416
25423
|
* // Example 3.
|
|
25417
|
-
|
|
25418
|
-
|
|
25424
|
+
* // Reset the aligned axis
|
|
25425
|
+
* billboard.alignedAxis = Cesium.Cartesian3.ZERO;
|
|
25419
25426
|
*/
|
|
25420
25427
|
alignedAxis: Cartesian3;
|
|
25421
25428
|
/**
|
|
@@ -25428,7 +25435,7 @@ export class Billboard {
|
|
|
25428
25435
|
height: number;
|
|
25429
25436
|
/**
|
|
25430
25437
|
* Gets or sets if the billboard size is in meters or pixels. <code>true</code> to size the billboard in meters;
|
|
25431
|
-
|
|
25438
|
+
* otherwise, the size is in pixels.
|
|
25432
25439
|
*/
|
|
25433
25440
|
sizeInMeters: boolean;
|
|
25434
25441
|
/**
|
|
@@ -25437,7 +25444,7 @@ export class Billboard {
|
|
|
25437
25444
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
25438
25445
|
/**
|
|
25439
25446
|
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
25440
|
-
|
|
25447
|
+
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
|
|
25441
25448
|
*/
|
|
25442
25449
|
disableDepthTestDistance: number;
|
|
25443
25450
|
/**
|
|
@@ -25446,72 +25453,72 @@ export class Billboard {
|
|
|
25446
25453
|
id: any;
|
|
25447
25454
|
/**
|
|
25448
25455
|
* <p>
|
|
25449
|
-
|
|
25450
|
-
|
|
25451
|
-
|
|
25452
|
-
|
|
25453
|
-
|
|
25454
|
-
|
|
25455
|
-
|
|
25456
|
+
* Gets or sets the image to be used for this billboard. If a texture has already been created for the
|
|
25457
|
+
* given image, the existing texture is used.
|
|
25458
|
+
* </p>
|
|
25459
|
+
* <p>
|
|
25460
|
+
* This property can be set to a loaded Image, a URL which will be loaded as an Image automatically,
|
|
25461
|
+
* a canvas, or another billboard's image property (from the same billboard collection).
|
|
25462
|
+
* </p>
|
|
25456
25463
|
* @example
|
|
25457
25464
|
* // load an image from a URL
|
|
25458
|
-
|
|
25459
|
-
|
|
25460
|
-
|
|
25461
|
-
|
|
25462
|
-
|
|
25465
|
+
* b.image = 'some/image/url.png';
|
|
25466
|
+
*
|
|
25467
|
+
* // assuming b1 and b2 are billboards in the same billboard collection,
|
|
25468
|
+
* // use the same image for both billboards.
|
|
25469
|
+
* b2.image = b1.image;
|
|
25463
25470
|
*/
|
|
25464
25471
|
image: string;
|
|
25465
25472
|
/**
|
|
25466
25473
|
* When <code>true</code>, this billboard is ready to render, i.e., the image
|
|
25467
|
-
|
|
25474
|
+
* has been downloaded and the WebGL resources are created.
|
|
25468
25475
|
*/
|
|
25469
25476
|
readonly ready: boolean;
|
|
25470
25477
|
/**
|
|
25471
25478
|
* <p>
|
|
25472
|
-
|
|
25473
|
-
|
|
25474
|
-
|
|
25475
|
-
|
|
25476
|
-
|
|
25477
|
-
|
|
25478
|
-
|
|
25479
|
-
|
|
25480
|
-
|
|
25481
|
-
|
|
25482
|
-
|
|
25479
|
+
* Sets the image to be used for this billboard. If a texture has already been created for the
|
|
25480
|
+
* given id, the existing texture is used.
|
|
25481
|
+
* </p>
|
|
25482
|
+
* <p>
|
|
25483
|
+
* This function is useful for dynamically creating textures that are shared across many billboards.
|
|
25484
|
+
* Only the first billboard will actually call the function and create the texture, while subsequent
|
|
25485
|
+
* billboards created with the same id will simply re-use the existing texture.
|
|
25486
|
+
* </p>
|
|
25487
|
+
* <p>
|
|
25488
|
+
* To load an image from a URL, setting the {@link Billboard#image} property is more convenient.
|
|
25489
|
+
* </p>
|
|
25483
25490
|
* @example
|
|
25484
25491
|
* // create a billboard image dynamically
|
|
25485
|
-
|
|
25486
|
-
|
|
25487
|
-
|
|
25488
|
-
|
|
25489
|
-
|
|
25490
|
-
|
|
25491
|
-
|
|
25492
|
-
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25492
|
+
* function drawImage(id) {
|
|
25493
|
+
* // create and draw an image using a canvas
|
|
25494
|
+
* const canvas = document.createElement('canvas');
|
|
25495
|
+
* const context2D = canvas.getContext('2d');
|
|
25496
|
+
* // ... draw image
|
|
25497
|
+
* return canvas;
|
|
25498
|
+
* }
|
|
25499
|
+
* // drawImage will be called to create the texture
|
|
25500
|
+
* b.setImage('myImage', drawImage);
|
|
25501
|
+
*
|
|
25502
|
+
* // subsequent billboards created in the same collection using the same id will use the existing
|
|
25503
|
+
* // texture, without the need to create the canvas or draw the image
|
|
25504
|
+
* b2.setImage('myImage', drawImage);
|
|
25498
25505
|
* @param id - The id of the image. This can be any string that uniquely identifies the image.
|
|
25499
25506
|
* @param image - The image to load. This parameter
|
|
25500
|
-
|
|
25501
|
-
|
|
25507
|
+
* can either be a loaded Image or Canvas, a URL which will be loaded as an Image automatically,
|
|
25508
|
+
* or a function which will be called to create the image if it hasn't been loaded already.
|
|
25502
25509
|
*/
|
|
25503
25510
|
setImage(id: string, image: HTMLImageElement | HTMLCanvasElement | string | Resource | Billboard.CreateImageCallback): void;
|
|
25504
25511
|
/**
|
|
25505
25512
|
* Uses a sub-region of the image with the given id as the image for this billboard,
|
|
25506
|
-
|
|
25513
|
+
* measured in pixels from the bottom-left.
|
|
25507
25514
|
* @param id - The id of the image to use.
|
|
25508
25515
|
* @param subRegion - The sub-region of the image.
|
|
25509
25516
|
*/
|
|
25510
25517
|
setImageSubRegion(id: string, subRegion: BoundingRectangle): void;
|
|
25511
25518
|
/**
|
|
25512
25519
|
* Computes the screen-space position of the billboard's origin, taking into account eye and pixel offsets.
|
|
25513
|
-
|
|
25514
|
-
|
|
25520
|
+
* The screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
25521
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
25515
25522
|
* @example
|
|
25516
25523
|
* console.log(b.computeScreenSpacePosition(scene).toString());
|
|
25517
25524
|
* @param scene - The scene.
|
|
@@ -25521,7 +25528,7 @@ export class Billboard {
|
|
|
25521
25528
|
computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2;
|
|
25522
25529
|
/**
|
|
25523
25530
|
* Determines if this billboard equals another billboard. Billboards are equal if all their properties
|
|
25524
|
-
|
|
25531
|
+
* are equal. Billboards in different collections can be equal.
|
|
25525
25532
|
* @param other - The billboard to compare for equality.
|
|
25526
25533
|
* @returns <code>true</code> if the billboards are equal; otherwise, <code>false</code>.
|
|
25527
25534
|
*/
|
|
@@ -31144,8 +31151,8 @@ export namespace GoogleEarthEnterpriseImageryProvider {
|
|
|
31144
31151
|
* @property metadata - A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.
|
|
31145
31152
|
* @property [ellipsoid] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
31146
31153
|
* @property [tileDiscardPolicy] - The policy that determines if a tile
|
|
31147
|
-
|
|
31148
|
-
|
|
31154
|
+
* is invalid and should be discarded. If this value is not specified, a default
|
|
31155
|
+
* is to discard tiles that fail to download.
|
|
31149
31156
|
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
31150
31157
|
*/
|
|
31151
31158
|
type ConstructorOptions = {
|
|
@@ -31159,41 +31166,41 @@ export namespace GoogleEarthEnterpriseImageryProvider {
|
|
|
31159
31166
|
|
|
31160
31167
|
/**
|
|
31161
31168
|
* Provides tiled imagery using the Google Earth Enterprise REST API.
|
|
31162
|
-
|
|
31163
|
-
Notes: This provider is for use with the 3D Earth API of Google Earth Enterprise,
|
|
31164
|
-
|
|
31169
|
+
*
|
|
31170
|
+
* Notes: This provider is for use with the 3D Earth API of Google Earth Enterprise,
|
|
31171
|
+
* {@link GoogleEarthEnterpriseMapsProvider} should be used with 2D Maps API.
|
|
31165
31172
|
* @example
|
|
31166
31173
|
* const geeMetadata = new GoogleEarthEnterpriseMetadata('http://www.earthenterprise.org/3d');
|
|
31167
|
-
const gee = new Cesium.GoogleEarthEnterpriseImageryProvider({
|
|
31168
|
-
|
|
31169
|
-
});
|
|
31174
|
+
* const gee = new Cesium.GoogleEarthEnterpriseImageryProvider({
|
|
31175
|
+
* metadata : geeMetadata
|
|
31176
|
+
* });
|
|
31170
31177
|
* @param options - Object describing initialization options
|
|
31171
31178
|
*/
|
|
31172
31179
|
export class GoogleEarthEnterpriseImageryProvider {
|
|
31173
31180
|
constructor(options: GoogleEarthEnterpriseImageryProvider.ConstructorOptions);
|
|
31174
31181
|
/**
|
|
31175
31182
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
31176
|
-
|
|
31183
|
+
* 1.0 representing fully opaque.
|
|
31177
31184
|
*/
|
|
31178
31185
|
defaultAlpha: number | undefined;
|
|
31179
31186
|
/**
|
|
31180
31187
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31181
|
-
|
|
31188
|
+
* 1.0 representing fully opaque.
|
|
31182
31189
|
*/
|
|
31183
31190
|
defaultNightAlpha: number | undefined;
|
|
31184
31191
|
/**
|
|
31185
31192
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31186
|
-
|
|
31193
|
+
* 1.0 representing fully opaque.
|
|
31187
31194
|
*/
|
|
31188
31195
|
defaultDayAlpha: number | undefined;
|
|
31189
31196
|
/**
|
|
31190
31197
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
31191
|
-
|
|
31198
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
31192
31199
|
*/
|
|
31193
31200
|
defaultBrightness: number | undefined;
|
|
31194
31201
|
/**
|
|
31195
31202
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
31196
|
-
|
|
31203
|
+
* the contrast while greater than 1.0 increases it.
|
|
31197
31204
|
*/
|
|
31198
31205
|
defaultContrast: number | undefined;
|
|
31199
31206
|
/**
|
|
@@ -31202,7 +31209,7 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31202
31209
|
defaultHue: number | undefined;
|
|
31203
31210
|
/**
|
|
31204
31211
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
31205
|
-
|
|
31212
|
+
* saturation while greater than 1.0 increases it.
|
|
31206
31213
|
*/
|
|
31207
31214
|
defaultSaturation: number | undefined;
|
|
31208
31215
|
/**
|
|
@@ -31227,45 +31234,45 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31227
31234
|
readonly proxy: Proxy;
|
|
31228
31235
|
/**
|
|
31229
31236
|
* Gets the width of each tile, in pixels. This function should
|
|
31230
|
-
|
|
31237
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31231
31238
|
*/
|
|
31232
31239
|
readonly tileWidth: number;
|
|
31233
31240
|
/**
|
|
31234
31241
|
* Gets the height of each tile, in pixels. This function should
|
|
31235
|
-
|
|
31242
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31236
31243
|
*/
|
|
31237
31244
|
readonly tileHeight: number;
|
|
31238
31245
|
/**
|
|
31239
31246
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
31240
|
-
|
|
31247
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31241
31248
|
*/
|
|
31242
31249
|
readonly maximumLevel: number | undefined;
|
|
31243
31250
|
/**
|
|
31244
31251
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
31245
|
-
|
|
31252
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31246
31253
|
*/
|
|
31247
31254
|
readonly minimumLevel: number;
|
|
31248
31255
|
/**
|
|
31249
31256
|
* Gets the tiling scheme used by this provider. This function should
|
|
31250
|
-
|
|
31257
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31251
31258
|
*/
|
|
31252
31259
|
readonly tilingScheme: TilingScheme;
|
|
31253
31260
|
/**
|
|
31254
31261
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
31255
|
-
|
|
31262
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31256
31263
|
*/
|
|
31257
31264
|
readonly rectangle: Rectangle;
|
|
31258
31265
|
/**
|
|
31259
31266
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
31260
|
-
|
|
31261
|
-
|
|
31262
|
-
|
|
31267
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
31268
|
+
* returns undefined, no tiles are filtered. This function should
|
|
31269
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31263
31270
|
*/
|
|
31264
31271
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
31265
31272
|
/**
|
|
31266
31273
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
31267
|
-
|
|
31268
|
-
|
|
31274
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
31275
|
+
* are passed an instance of {@link TileProviderError}.
|
|
31269
31276
|
*/
|
|
31270
31277
|
readonly errorEvent: Event;
|
|
31271
31278
|
/**
|
|
@@ -31278,15 +31285,15 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31278
31285
|
readonly readyPromise: Promise<boolean>;
|
|
31279
31286
|
/**
|
|
31280
31287
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
31281
|
-
|
|
31288
|
+
* the source of the imagery. This function should not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31282
31289
|
*/
|
|
31283
31290
|
readonly credit: Credit;
|
|
31284
31291
|
/**
|
|
31285
31292
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
31286
|
-
|
|
31287
|
-
|
|
31288
|
-
|
|
31289
|
-
|
|
31293
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
31294
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
31295
|
+
* as if their alpha is 1.0 everywhere. Setting this property to false reduces memory usage
|
|
31296
|
+
* and texture upload time.
|
|
31290
31297
|
*/
|
|
31291
31298
|
readonly hasAlphaChannel: boolean;
|
|
31292
31299
|
/**
|
|
@@ -31299,29 +31306,29 @@ export class GoogleEarthEnterpriseImageryProvider {
|
|
|
31299
31306
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
31300
31307
|
/**
|
|
31301
31308
|
* Requests the image for a given tile. This function should
|
|
31302
|
-
|
|
31309
|
+
* not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true.
|
|
31303
31310
|
* @param x - The tile X coordinate.
|
|
31304
31311
|
* @param y - The tile Y coordinate.
|
|
31305
31312
|
* @param level - The tile level.
|
|
31306
31313
|
* @param [request] - The request object. Intended for internal use only.
|
|
31307
31314
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
31308
|
-
|
|
31309
|
-
|
|
31310
|
-
|
|
31315
|
+
* undefined if there are too many active requests to the server, and the request
|
|
31316
|
+
* should be retried later. The resolved image may be either an
|
|
31317
|
+
* Image or a Canvas DOM object.
|
|
31311
31318
|
*/
|
|
31312
31319
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
31313
31320
|
/**
|
|
31314
31321
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
31315
|
-
|
|
31322
|
+
* undefined.
|
|
31316
31323
|
* @param x - The tile X coordinate.
|
|
31317
31324
|
* @param y - The tile Y coordinate.
|
|
31318
31325
|
* @param level - The tile level.
|
|
31319
31326
|
* @param longitude - The longitude at which to pick features.
|
|
31320
31327
|
* @param latitude - The latitude at which to pick features.
|
|
31321
31328
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
31322
|
-
|
|
31323
|
-
|
|
31324
|
-
|
|
31329
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
31330
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
31331
|
+
* It may also be undefined if picking is not supported.
|
|
31325
31332
|
*/
|
|
31326
31333
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
31327
31334
|
}
|
|
@@ -31571,8 +31578,8 @@ export namespace GridImageryProvider {
|
|
|
31571
31578
|
* Initialization options for the GridImageryProvider constructor
|
|
31572
31579
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme for which to draw tiles.
|
|
31573
31580
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
31574
|
-
|
|
31575
|
-
|
|
31581
|
+
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
31582
|
+
* parameter is specified, the WGS84 ellipsoid is used.
|
|
31576
31583
|
* @property [cells = 8] - The number of grids cells.
|
|
31577
31584
|
* @property [color = Color(1.0, 1.0, 1.0, 0.4)] - The color to draw grid lines.
|
|
31578
31585
|
* @property [glowColor = Color(0.0, 1.0, 0.0, 0.05)] - The color to draw glow for grid lines.
|
|
@@ -31598,34 +31605,34 @@ export namespace GridImageryProvider {
|
|
|
31598
31605
|
|
|
31599
31606
|
/**
|
|
31600
31607
|
* An {@link ImageryProvider} that draws a wireframe grid on every tile with controllable background and glow.
|
|
31601
|
-
May be useful for custom rendering effects or debugging terrain.
|
|
31608
|
+
* May be useful for custom rendering effects or debugging terrain.
|
|
31602
31609
|
* @param options - Object describing initialization options
|
|
31603
31610
|
*/
|
|
31604
31611
|
export class GridImageryProvider {
|
|
31605
31612
|
constructor(options: GridImageryProvider.ConstructorOptions);
|
|
31606
31613
|
/**
|
|
31607
31614
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
31608
|
-
|
|
31615
|
+
* 1.0 representing fully opaque.
|
|
31609
31616
|
*/
|
|
31610
31617
|
defaultAlpha: number | undefined;
|
|
31611
31618
|
/**
|
|
31612
31619
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31613
|
-
|
|
31620
|
+
* 1.0 representing fully opaque.
|
|
31614
31621
|
*/
|
|
31615
31622
|
defaultNightAlpha: number | undefined;
|
|
31616
31623
|
/**
|
|
31617
31624
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
31618
|
-
|
|
31625
|
+
* 1.0 representing fully opaque.
|
|
31619
31626
|
*/
|
|
31620
31627
|
defaultDayAlpha: number | undefined;
|
|
31621
31628
|
/**
|
|
31622
31629
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
31623
|
-
|
|
31630
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
31624
31631
|
*/
|
|
31625
31632
|
defaultBrightness: number | undefined;
|
|
31626
31633
|
/**
|
|
31627
31634
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
31628
|
-
|
|
31635
|
+
* the contrast while greater than 1.0 increases it.
|
|
31629
31636
|
*/
|
|
31630
31637
|
defaultContrast: number | undefined;
|
|
31631
31638
|
/**
|
|
@@ -31634,7 +31641,7 @@ export class GridImageryProvider {
|
|
|
31634
31641
|
defaultHue: number | undefined;
|
|
31635
31642
|
/**
|
|
31636
31643
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
31637
|
-
|
|
31644
|
+
* saturation while greater than 1.0 increases it.
|
|
31638
31645
|
*/
|
|
31639
31646
|
defaultSaturation: number | undefined;
|
|
31640
31647
|
/**
|
|
@@ -31655,45 +31662,45 @@ export class GridImageryProvider {
|
|
|
31655
31662
|
readonly proxy: Proxy;
|
|
31656
31663
|
/**
|
|
31657
31664
|
* Gets the width of each tile, in pixels. This function should
|
|
31658
|
-
|
|
31665
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31659
31666
|
*/
|
|
31660
31667
|
readonly tileWidth: number;
|
|
31661
31668
|
/**
|
|
31662
31669
|
* Gets the height of each tile, in pixels. This function should
|
|
31663
|
-
|
|
31670
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31664
31671
|
*/
|
|
31665
31672
|
readonly tileHeight: number;
|
|
31666
31673
|
/**
|
|
31667
31674
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
31668
|
-
|
|
31675
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31669
31676
|
*/
|
|
31670
31677
|
readonly maximumLevel: number | undefined;
|
|
31671
31678
|
/**
|
|
31672
31679
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
31673
|
-
|
|
31680
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31674
31681
|
*/
|
|
31675
31682
|
readonly minimumLevel: number;
|
|
31676
31683
|
/**
|
|
31677
31684
|
* Gets the tiling scheme used by this provider. This function should
|
|
31678
|
-
|
|
31685
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31679
31686
|
*/
|
|
31680
31687
|
readonly tilingScheme: TilingScheme;
|
|
31681
31688
|
/**
|
|
31682
31689
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
31683
|
-
|
|
31690
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31684
31691
|
*/
|
|
31685
31692
|
readonly rectangle: Rectangle;
|
|
31686
31693
|
/**
|
|
31687
31694
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31695
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
31696
|
+
* returns undefined, no tiles are filtered. This function should
|
|
31697
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31691
31698
|
*/
|
|
31692
31699
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
31693
31700
|
/**
|
|
31694
31701
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
31695
|
-
|
|
31696
|
-
|
|
31702
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
31703
|
+
* are passed an instance of {@link TileProviderError}.
|
|
31697
31704
|
*/
|
|
31698
31705
|
readonly errorEvent: Event;
|
|
31699
31706
|
/**
|
|
@@ -31706,15 +31713,15 @@ export class GridImageryProvider {
|
|
|
31706
31713
|
readonly readyPromise: Promise<boolean>;
|
|
31707
31714
|
/**
|
|
31708
31715
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
31709
|
-
|
|
31716
|
+
* the source of the imagery. This function should not be called before {@link GridImageryProvider#ready} returns true.
|
|
31710
31717
|
*/
|
|
31711
31718
|
readonly credit: Credit;
|
|
31712
31719
|
/**
|
|
31713
31720
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
|
|
31717
|
-
|
|
31721
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
31722
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
31723
|
+
* as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
31724
|
+
* and texture upload time are reduced.
|
|
31718
31725
|
*/
|
|
31719
31726
|
readonly hasAlphaChannel: boolean;
|
|
31720
31727
|
/**
|
|
@@ -31735,29 +31742,29 @@ export class GridImageryProvider {
|
|
|
31735
31742
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
31736
31743
|
/**
|
|
31737
31744
|
* Requests the image for a given tile. This function should
|
|
31738
|
-
|
|
31745
|
+
* not be called before {@link GridImageryProvider#ready} returns true.
|
|
31739
31746
|
* @param x - The tile X coordinate.
|
|
31740
31747
|
* @param y - The tile Y coordinate.
|
|
31741
31748
|
* @param level - The tile level.
|
|
31742
31749
|
* @param [request] - The request object. Intended for internal use only.
|
|
31743
31750
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
31744
|
-
|
|
31745
|
-
|
|
31746
|
-
|
|
31751
|
+
* undefined if there are too many active requests to the server, and the request
|
|
31752
|
+
* should be retried later. The resolved image may be either an
|
|
31753
|
+
* Image or a Canvas DOM object.
|
|
31747
31754
|
*/
|
|
31748
31755
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
31749
31756
|
/**
|
|
31750
31757
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
31751
|
-
|
|
31758
|
+
* undefined.
|
|
31752
31759
|
* @param x - The tile X coordinate.
|
|
31753
31760
|
* @param y - The tile Y coordinate.
|
|
31754
31761
|
* @param level - The tile level.
|
|
31755
31762
|
* @param longitude - The longitude at which to pick features.
|
|
31756
31763
|
* @param latitude - The latitude at which to pick features.
|
|
31757
31764
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31765
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
31766
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
31767
|
+
* It may also be undefined if picking is not supported.
|
|
31761
31768
|
*/
|
|
31762
31769
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
31763
31770
|
}
|
|
@@ -33396,33 +33403,33 @@ export class Label {
|
|
|
33396
33403
|
|
|
33397
33404
|
/**
|
|
33398
33405
|
* A renderable collection of labels. Labels are viewport-aligned text positioned in the 3D scene.
|
|
33399
|
-
Each label can have a different font, color, scale, etc.
|
|
33400
|
-
<br /><br />
|
|
33401
|
-
<div align='center'>
|
|
33402
|
-
<img src='Images/Label.png' width='400' height='300' /><br />
|
|
33403
|
-
Example labels
|
|
33404
|
-
</div>
|
|
33405
|
-
<br /><br />
|
|
33406
|
-
Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
33407
|
-
and {@link LabelCollection#remove}.
|
|
33406
|
+
* Each label can have a different font, color, scale, etc.
|
|
33407
|
+
* <br /><br />
|
|
33408
|
+
* <div align='center'>
|
|
33409
|
+
* <img src='Images/Label.png' width='400' height='300' /><br />
|
|
33410
|
+
* Example labels
|
|
33411
|
+
* </div>
|
|
33412
|
+
* <br /><br />
|
|
33413
|
+
* Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
33414
|
+
* and {@link LabelCollection#remove}.
|
|
33408
33415
|
* @example
|
|
33409
33416
|
* // Create a label collection with two labels
|
|
33410
|
-
const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
33411
|
-
labels.add({
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
});
|
|
33415
|
-
labels.add({
|
|
33416
|
-
|
|
33417
|
-
|
|
33418
|
-
});
|
|
33417
|
+
* const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
33418
|
+
* labels.add({
|
|
33419
|
+
* position : new Cesium.Cartesian3(1.0, 2.0, 3.0),
|
|
33420
|
+
* text : 'A label'
|
|
33421
|
+
* });
|
|
33422
|
+
* labels.add({
|
|
33423
|
+
* position : new Cesium.Cartesian3(4.0, 5.0, 6.0),
|
|
33424
|
+
* text : 'Another label'
|
|
33425
|
+
* });
|
|
33419
33426
|
* @param [options] - Object with the following properties:
|
|
33420
33427
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms each label from model to world coordinates.
|
|
33421
33428
|
* @param [options.debugShowBoundingVolume = false] - For debugging only. Determines if this primitive's commands' bounding spheres are shown.
|
|
33422
33429
|
* @param [options.scene] - Must be passed in for labels that use the height reference property or will be depth tested against the globe.
|
|
33423
33430
|
* @param [options.blendOption = BlendOption.OPAQUE_AND_TRANSLUCENT] - The label blending option. The default
|
|
33424
|
-
is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33425
|
-
setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
33431
|
+
* is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33432
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
33426
33433
|
* @param [options.show = true] - Determines if the labels in the collection will be shown.
|
|
33427
33434
|
*/
|
|
33428
33435
|
export class LabelCollection {
|
|
@@ -33439,85 +33446,85 @@ export class LabelCollection {
|
|
|
33439
33446
|
show: boolean;
|
|
33440
33447
|
/**
|
|
33441
33448
|
* The 4x4 transformation matrix that transforms each label in this collection from model to world coordinates.
|
|
33442
|
-
|
|
33443
|
-
|
|
33444
|
-
|
|
33449
|
+
* When this is the identity matrix, the labels are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
33450
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
33451
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
33445
33452
|
* @example
|
|
33446
33453
|
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
|
|
33447
|
-
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
|
|
33451
|
-
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33461
|
-
|
|
33462
|
-
|
|
33463
|
-
|
|
33454
|
+
* labels.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
|
|
33455
|
+
* labels.add({
|
|
33456
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 0.0),
|
|
33457
|
+
* text : 'Center'
|
|
33458
|
+
* });
|
|
33459
|
+
* labels.add({
|
|
33460
|
+
* position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0),
|
|
33461
|
+
* text : 'East'
|
|
33462
|
+
* });
|
|
33463
|
+
* labels.add({
|
|
33464
|
+
* position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0),
|
|
33465
|
+
* text : 'North'
|
|
33466
|
+
* });
|
|
33467
|
+
* labels.add({
|
|
33468
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0),
|
|
33469
|
+
* text : 'Up'
|
|
33470
|
+
* });
|
|
33464
33471
|
*/
|
|
33465
33472
|
modelMatrix: Matrix4;
|
|
33466
33473
|
/**
|
|
33467
33474
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
33468
|
-
|
|
33469
|
-
|
|
33470
|
-
|
|
33475
|
+
* <p>
|
|
33476
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
33477
|
+
* </p>
|
|
33471
33478
|
*/
|
|
33472
33479
|
debugShowBoundingVolume: boolean;
|
|
33473
33480
|
/**
|
|
33474
33481
|
* The label blending option. The default is used for rendering both opaque and translucent labels.
|
|
33475
|
-
|
|
33476
|
-
|
|
33477
|
-
|
|
33482
|
+
* However, if either all of the labels are completely opaque or all are completely translucent,
|
|
33483
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve
|
|
33484
|
+
* performance by up to 2x.
|
|
33478
33485
|
*/
|
|
33479
33486
|
blendOption: BlendOption;
|
|
33480
33487
|
/**
|
|
33481
33488
|
* Returns the number of labels in this collection. This is commonly used with
|
|
33482
|
-
|
|
33483
|
-
|
|
33489
|
+
* {@link LabelCollection#get} to iterate over all the labels
|
|
33490
|
+
* in the collection.
|
|
33484
33491
|
*/
|
|
33485
33492
|
length: number;
|
|
33486
33493
|
/**
|
|
33487
33494
|
* Creates and adds a label with the specified initial properties to the collection.
|
|
33488
|
-
|
|
33495
|
+
* The added label is returned so it can be modified or removed from the collection later.
|
|
33489
33496
|
* @example
|
|
33490
33497
|
* // Example 1: Add a label, specifying all the default values.
|
|
33491
|
-
|
|
33492
|
-
|
|
33493
|
-
|
|
33494
|
-
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
|
|
33500
|
-
|
|
33501
|
-
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33506
|
-
|
|
33507
|
-
|
|
33508
|
-
|
|
33509
|
-
|
|
33510
|
-
|
|
33511
|
-
|
|
33512
|
-
|
|
33498
|
+
* const l = labels.add({
|
|
33499
|
+
* show : true,
|
|
33500
|
+
* position : Cesium.Cartesian3.ZERO,
|
|
33501
|
+
* text : '',
|
|
33502
|
+
* font : '30px sans-serif',
|
|
33503
|
+
* fillColor : Cesium.Color.WHITE,
|
|
33504
|
+
* outlineColor : Cesium.Color.BLACK,
|
|
33505
|
+
* outlineWidth : 1.0,
|
|
33506
|
+
* showBackground : false,
|
|
33507
|
+
* backgroundColor : new Cesium.Color(0.165, 0.165, 0.165, 0.8),
|
|
33508
|
+
* backgroundPadding : new Cesium.Cartesian2(7, 5),
|
|
33509
|
+
* style : Cesium.LabelStyle.FILL,
|
|
33510
|
+
* pixelOffset : Cesium.Cartesian2.ZERO,
|
|
33511
|
+
* eyeOffset : Cesium.Cartesian3.ZERO,
|
|
33512
|
+
* horizontalOrigin : Cesium.HorizontalOrigin.LEFT,
|
|
33513
|
+
* verticalOrigin : Cesium.VerticalOrigin.BASELINE,
|
|
33514
|
+
* scale : 1.0,
|
|
33515
|
+
* translucencyByDistance : undefined,
|
|
33516
|
+
* pixelOffsetScaleByDistance : undefined,
|
|
33517
|
+
* heightReference : HeightReference.NONE,
|
|
33518
|
+
* distanceDisplayCondition : undefined
|
|
33519
|
+
* });
|
|
33513
33520
|
* @example
|
|
33514
33521
|
* // Example 2: Specify only the label's cartographic position,
|
|
33515
|
-
|
|
33516
|
-
|
|
33517
|
-
|
|
33518
|
-
|
|
33519
|
-
|
|
33520
|
-
|
|
33522
|
+
* // text, and font.
|
|
33523
|
+
* const l = labels.add({
|
|
33524
|
+
* position : Cesium.Cartesian3.fromRadians(longitude, latitude, height),
|
|
33525
|
+
* text : 'Hello World',
|
|
33526
|
+
* font : '24px Helvetica',
|
|
33527
|
+
* });
|
|
33521
33528
|
* @param [options] - A template describing the label's properties as shown in Example 1.
|
|
33522
33529
|
* @returns The label that was added to the collection.
|
|
33523
33530
|
*/
|
|
@@ -33526,7 +33533,7 @@ export class LabelCollection {
|
|
|
33526
33533
|
* Removes a label from the collection. Once removed, a label is no longer usable.
|
|
33527
33534
|
* @example
|
|
33528
33535
|
* const l = labels.add(...);
|
|
33529
|
-
|
|
33536
|
+
* labels.remove(l); // Returns true
|
|
33530
33537
|
* @param label - The label to remove.
|
|
33531
33538
|
* @returns <code>true</code> if the label was removed; <code>false</code> if the label was not found in the collection.
|
|
33532
33539
|
*/
|
|
@@ -33535,8 +33542,8 @@ export class LabelCollection {
|
|
|
33535
33542
|
* Removes all labels from the collection.
|
|
33536
33543
|
* @example
|
|
33537
33544
|
* labels.add(...);
|
|
33538
|
-
|
|
33539
|
-
|
|
33545
|
+
* labels.add(...);
|
|
33546
|
+
* labels.removeAll();
|
|
33540
33547
|
*/
|
|
33541
33548
|
removeAll(): void;
|
|
33542
33549
|
/**
|
|
@@ -33547,36 +33554,36 @@ export class LabelCollection {
|
|
|
33547
33554
|
contains(label: Label): boolean;
|
|
33548
33555
|
/**
|
|
33549
33556
|
* Returns the label in the collection at the specified index. Indices are zero-based
|
|
33550
|
-
|
|
33551
|
-
|
|
33552
|
-
|
|
33553
|
-
|
|
33557
|
+
* and increase as labels are added. Removing a label shifts all labels after
|
|
33558
|
+
* it to the left, changing their indices. This function is commonly used with
|
|
33559
|
+
* {@link LabelCollection#length} to iterate over all the labels
|
|
33560
|
+
* in the collection.
|
|
33554
33561
|
* @example
|
|
33555
33562
|
* // Toggle the show property of every label in the collection
|
|
33556
|
-
|
|
33557
|
-
|
|
33558
|
-
|
|
33559
|
-
|
|
33560
|
-
|
|
33563
|
+
* const len = labels.length;
|
|
33564
|
+
* for (let i = 0; i < len; ++i) {
|
|
33565
|
+
* const l = billboards.get(i);
|
|
33566
|
+
* l.show = !l.show;
|
|
33567
|
+
* }
|
|
33561
33568
|
* @param index - The zero-based index of the billboard.
|
|
33562
33569
|
* @returns The label at the specified index.
|
|
33563
33570
|
*/
|
|
33564
33571
|
get(index: number): Label;
|
|
33565
33572
|
/**
|
|
33566
33573
|
* Returns true if this object was destroyed; otherwise, false.
|
|
33567
|
-
|
|
33568
|
-
|
|
33569
|
-
|
|
33574
|
+
* <br /><br />
|
|
33575
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
33576
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
33570
33577
|
* @returns True if this object was destroyed; otherwise, false.
|
|
33571
33578
|
*/
|
|
33572
33579
|
isDestroyed(): boolean;
|
|
33573
33580
|
/**
|
|
33574
33581
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
33575
|
-
|
|
33576
|
-
|
|
33577
|
-
|
|
33578
|
-
|
|
33579
|
-
|
|
33582
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
33583
|
+
* <br /><br />
|
|
33584
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
33585
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
33586
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
33580
33587
|
* @example
|
|
33581
33588
|
* labels = labels && labels.destroy();
|
|
33582
33589
|
*/
|
|
@@ -38223,88 +38230,88 @@ export enum PostProcessStageSampleMode {
|
|
|
38223
38230
|
|
|
38224
38231
|
/**
|
|
38225
38232
|
* A primitive represents geometry in the {@link Scene}. The geometry can be from a single {@link GeometryInstance}
|
|
38226
|
-
as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
38227
|
-
geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
38228
|
-
<p>
|
|
38229
|
-
A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
38230
|
-
{@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
38231
|
-
and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
38232
|
-
and match most of them and add a new geometry or appearance independently of each other.
|
|
38233
|
-
</p>
|
|
38234
|
-
<p>
|
|
38235
|
-
Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
38236
|
-
Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
38237
|
-
per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
38238
|
-
</p>
|
|
38239
|
-
<p>
|
|
38240
|
-
{@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
38241
|
-
show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
38242
|
-
shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
38243
|
-
</p>
|
|
38233
|
+
* as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
38234
|
+
* geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
38235
|
+
* <p>
|
|
38236
|
+
* A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
38237
|
+
* {@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
38238
|
+
* and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
38239
|
+
* and match most of them and add a new geometry or appearance independently of each other.
|
|
38240
|
+
* </p>
|
|
38241
|
+
* <p>
|
|
38242
|
+
* Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
38243
|
+
* Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
38244
|
+
* per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
38245
|
+
* </p>
|
|
38246
|
+
* <p>
|
|
38247
|
+
* {@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
38248
|
+
* show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
38249
|
+
* shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
38250
|
+
* </p>
|
|
38244
38251
|
* @example
|
|
38245
38252
|
* // 1. Draw a translucent ellipse on the surface with a checkerboard pattern
|
|
38246
|
-
const instance = new Cesium.GeometryInstance({
|
|
38247
|
-
|
|
38248
|
-
|
|
38249
|
-
|
|
38250
|
-
|
|
38251
|
-
|
|
38252
|
-
|
|
38253
|
-
|
|
38254
|
-
|
|
38255
|
-
});
|
|
38256
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38257
|
-
|
|
38258
|
-
|
|
38259
|
-
|
|
38260
|
-
|
|
38261
|
-
}));
|
|
38253
|
+
* const instance = new Cesium.GeometryInstance({
|
|
38254
|
+
* geometry : new Cesium.EllipseGeometry({
|
|
38255
|
+
* center : Cesium.Cartesian3.fromDegrees(-100.0, 20.0),
|
|
38256
|
+
* semiMinorAxis : 500000.0,
|
|
38257
|
+
* semiMajorAxis : 1000000.0,
|
|
38258
|
+
* rotation : Cesium.Math.PI_OVER_FOUR,
|
|
38259
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_ST
|
|
38260
|
+
* }),
|
|
38261
|
+
* id : 'object returned when this instance is picked and to get/set per-instance attributes'
|
|
38262
|
+
* });
|
|
38263
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38264
|
+
* geometryInstances : instance,
|
|
38265
|
+
* appearance : new Cesium.EllipsoidSurfaceAppearance({
|
|
38266
|
+
* material : Cesium.Material.fromType('Checkerboard')
|
|
38267
|
+
* })
|
|
38268
|
+
* }));
|
|
38262
38269
|
* @example
|
|
38263
38270
|
* // 2. Draw different instances each with a unique color
|
|
38264
|
-
const rectangleInstance = new Cesium.GeometryInstance({
|
|
38265
|
-
|
|
38266
|
-
|
|
38267
|
-
|
|
38268
|
-
|
|
38269
|
-
|
|
38270
|
-
|
|
38271
|
-
|
|
38272
|
-
|
|
38273
|
-
});
|
|
38274
|
-
const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
38275
|
-
|
|
38276
|
-
|
|
38277
|
-
|
|
38278
|
-
|
|
38279
|
-
|
|
38280
|
-
|
|
38281
|
-
|
|
38282
|
-
|
|
38283
|
-
|
|
38284
|
-
|
|
38285
|
-
});
|
|
38286
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38287
|
-
|
|
38288
|
-
|
|
38289
|
-
}));
|
|
38271
|
+
* const rectangleInstance = new Cesium.GeometryInstance({
|
|
38272
|
+
* geometry : new Cesium.RectangleGeometry({
|
|
38273
|
+
* rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0),
|
|
38274
|
+
* vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
|
|
38275
|
+
* }),
|
|
38276
|
+
* id : 'rectangle',
|
|
38277
|
+
* attributes : {
|
|
38278
|
+
* color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
|
|
38279
|
+
* }
|
|
38280
|
+
* });
|
|
38281
|
+
* const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
38282
|
+
* geometry : new Cesium.EllipsoidGeometry({
|
|
38283
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
38284
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
38285
|
+
* }),
|
|
38286
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
38287
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
38288
|
+
* id : 'ellipsoid',
|
|
38289
|
+
* attributes : {
|
|
38290
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
38291
|
+
* }
|
|
38292
|
+
* });
|
|
38293
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38294
|
+
* geometryInstances : [rectangleInstance, ellipsoidInstance],
|
|
38295
|
+
* appearance : new Cesium.PerInstanceColorAppearance()
|
|
38296
|
+
* }));
|
|
38290
38297
|
* @example
|
|
38291
38298
|
* // 3. Create the geometry on the main thread.
|
|
38292
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
38293
|
-
|
|
38294
|
-
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
38298
|
-
|
|
38299
|
-
|
|
38300
|
-
|
|
38301
|
-
|
|
38302
|
-
|
|
38303
|
-
|
|
38304
|
-
|
|
38305
|
-
|
|
38306
|
-
|
|
38307
|
-
}));
|
|
38299
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
38300
|
+
* geometryInstances : new Cesium.GeometryInstance({
|
|
38301
|
+
* geometry : Cesium.EllipsoidGeometry.createGeometry(new Cesium.EllipsoidGeometry({
|
|
38302
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
38303
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
38304
|
+
* })),
|
|
38305
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
38306
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
38307
|
+
* id : 'ellipsoid',
|
|
38308
|
+
* attributes : {
|
|
38309
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
38310
|
+
* }
|
|
38311
|
+
* }),
|
|
38312
|
+
* appearance : new Cesium.PerInstanceColorAppearance(),
|
|
38313
|
+
* asynchronous : false
|
|
38314
|
+
* }));
|
|
38308
38315
|
* @param [options] - Object with the following properties:
|
|
38309
38316
|
* @param [options.geometryInstances] - The geometry instances - or a single geometry instance - to render.
|
|
38310
38317
|
* @param [options.appearance] - The appearance used to render the primitive.
|
|
@@ -38340,67 +38347,67 @@ export class Primitive {
|
|
|
38340
38347
|
});
|
|
38341
38348
|
/**
|
|
38342
38349
|
* The geometry instances rendered with this primitive. This may
|
|
38343
|
-
|
|
38344
|
-
|
|
38345
|
-
|
|
38346
|
-
|
|
38347
|
-
|
|
38350
|
+
* be <code>undefined</code> if <code>options.releaseGeometryInstances</code>
|
|
38351
|
+
* is <code>true</code> when the primitive is constructed.
|
|
38352
|
+
* <p>
|
|
38353
|
+
* Changing this property after the primitive is rendered has no effect.
|
|
38354
|
+
* </p>
|
|
38348
38355
|
*/
|
|
38349
38356
|
readonly geometryInstances: GeometryInstance[] | GeometryInstance;
|
|
38350
38357
|
/**
|
|
38351
38358
|
* The {@link Appearance} used to shade this primitive. Each geometry
|
|
38352
|
-
|
|
38353
|
-
|
|
38354
|
-
|
|
38359
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
38360
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
38361
|
+
* properties.
|
|
38355
38362
|
*/
|
|
38356
38363
|
appearance: Appearance;
|
|
38357
38364
|
/**
|
|
38358
38365
|
* The {@link Appearance} used to shade this primitive when it fails the depth test. Each geometry
|
|
38359
|
-
|
|
38360
|
-
|
|
38361
|
-
|
|
38362
|
-
|
|
38363
|
-
|
|
38364
|
-
|
|
38365
|
-
|
|
38366
|
-
|
|
38367
|
-
|
|
38368
|
-
|
|
38369
|
-
|
|
38370
|
-
|
|
38371
|
-
|
|
38366
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
38367
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
38368
|
+
* properties.
|
|
38369
|
+
*
|
|
38370
|
+
* <p>
|
|
38371
|
+
* When using an appearance that requires a color attribute, like PerInstanceColorAppearance,
|
|
38372
|
+
* add a depthFailColor per-instance attribute instead.
|
|
38373
|
+
* </p>
|
|
38374
|
+
*
|
|
38375
|
+
* <p>
|
|
38376
|
+
* Requires the EXT_frag_depth WebGL extension to render properly. If the extension is not supported,
|
|
38377
|
+
* there may be artifacts.
|
|
38378
|
+
* </p>
|
|
38372
38379
|
*/
|
|
38373
38380
|
depthFailAppearance: Appearance;
|
|
38374
38381
|
/**
|
|
38375
38382
|
* The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
|
|
38376
|
-
|
|
38377
|
-
|
|
38378
|
-
|
|
38379
|
-
|
|
38380
|
-
|
|
38381
|
-
|
|
38382
|
-
|
|
38383
|
+
* When this is the identity matrix, the primitive is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
38384
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
38385
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
38386
|
+
*
|
|
38387
|
+
* <p>
|
|
38388
|
+
* This property is only supported in 3D mode.
|
|
38389
|
+
* </p>
|
|
38383
38390
|
* @example
|
|
38384
38391
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
38385
|
-
|
|
38392
|
+
* p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
38386
38393
|
*/
|
|
38387
38394
|
modelMatrix: Matrix4;
|
|
38388
38395
|
/**
|
|
38389
38396
|
* Determines if the primitive will be shown. This affects all geometry
|
|
38390
|
-
|
|
38397
|
+
* instances in the primitive.
|
|
38391
38398
|
*/
|
|
38392
38399
|
show: boolean;
|
|
38393
38400
|
/**
|
|
38394
38401
|
* When <code>true</code>, the renderer frustum culls and horizon culls the primitive's commands
|
|
38395
|
-
|
|
38396
|
-
|
|
38402
|
+
* based on their bounding volume. Set this to <code>false</code> for a small performance gain
|
|
38403
|
+
* if you are manually culling the primitive.
|
|
38397
38404
|
*/
|
|
38398
38405
|
cull: boolean;
|
|
38399
38406
|
/**
|
|
38400
38407
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38408
|
+
* <p>
|
|
38409
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
38410
|
+
* </p>
|
|
38404
38411
|
*/
|
|
38405
38412
|
debugShowBoundingVolume: boolean;
|
|
38406
38413
|
/**
|
|
@@ -38433,8 +38440,8 @@ export class Primitive {
|
|
|
38433
38440
|
readonly compressVertices: boolean;
|
|
38434
38441
|
/**
|
|
38435
38442
|
* Determines if the primitive is complete and ready to render. If this property is
|
|
38436
|
-
|
|
38437
|
-
|
|
38443
|
+
* true, the primitive will be rendered the next time that {@link Primitive#update}
|
|
38444
|
+
* is called.
|
|
38438
38445
|
*/
|
|
38439
38446
|
readonly ready: boolean;
|
|
38440
38447
|
/**
|
|
@@ -38443,42 +38450,42 @@ export class Primitive {
|
|
|
38443
38450
|
readonly readyPromise: Promise<Primitive>;
|
|
38444
38451
|
/**
|
|
38445
38452
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38453
|
+
* get the draw commands needed to render this primitive.
|
|
38454
|
+
* <p>
|
|
38455
|
+
* Do not call this function directly. This is documented just to
|
|
38456
|
+
* list the exceptions that may be propagated when the scene is rendered:
|
|
38457
|
+
* </p>
|
|
38451
38458
|
*/
|
|
38452
38459
|
update(): void;
|
|
38453
38460
|
/**
|
|
38454
38461
|
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
|
|
38455
38462
|
* @example
|
|
38456
38463
|
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
38457
|
-
|
|
38458
|
-
|
|
38459
|
-
|
|
38460
|
-
|
|
38464
|
+
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
38465
|
+
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);
|
|
38466
|
+
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(100.0, 10000.0);
|
|
38467
|
+
* attributes.offset = Cesium.OffsetGeometryInstanceAttribute.toValue(Cartesian3.IDENTITY);
|
|
38461
38468
|
* @param id - The id of the {@link GeometryInstance}.
|
|
38462
38469
|
* @returns The typed array in the attribute's format or undefined if the is no instance with id.
|
|
38463
38470
|
*/
|
|
38464
38471
|
getGeometryInstanceAttributes(id: any): any;
|
|
38465
38472
|
/**
|
|
38466
38473
|
* Returns true if this object was destroyed; otherwise, false.
|
|
38467
|
-
|
|
38468
|
-
|
|
38469
|
-
|
|
38470
|
-
|
|
38474
|
+
* <p>
|
|
38475
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
38476
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
38477
|
+
* </p>
|
|
38471
38478
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
38472
38479
|
*/
|
|
38473
38480
|
isDestroyed(): boolean;
|
|
38474
38481
|
/**
|
|
38475
38482
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
38476
|
-
|
|
38477
|
-
|
|
38478
|
-
|
|
38479
|
-
|
|
38480
|
-
|
|
38481
|
-
|
|
38483
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
38484
|
+
* <p>
|
|
38485
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
38486
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
38487
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
38488
|
+
* </p>
|
|
38482
38489
|
* @example
|
|
38483
38490
|
* e = e && e.destroy();
|
|
38484
38491
|
*/
|
|
@@ -40155,8 +40162,8 @@ export namespace TileCoordinatesImageryProvider {
|
|
|
40155
40162
|
* Initialization options for the TileCoordinatesImageryProvider constructor
|
|
40156
40163
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme for which to draw tiles.
|
|
40157
40164
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
40158
|
-
|
|
40159
|
-
|
|
40165
|
+
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
40166
|
+
* parameter is specified, the WGS84 ellipsoid is used.
|
|
40160
40167
|
* @property [color = Color.YELLOW] - The color to draw the tile box and label.
|
|
40161
40168
|
* @property [tileWidth = 256] - The width of the tile for level-of-detail selection purposes.
|
|
40162
40169
|
* @property [tileHeight = 256] - The height of the tile for level-of-detail selection purposes.
|
|
@@ -40172,35 +40179,35 @@ export namespace TileCoordinatesImageryProvider {
|
|
|
40172
40179
|
|
|
40173
40180
|
/**
|
|
40174
40181
|
* An {@link ImageryProvider} that draws a box around every rendered tile in the tiling scheme, and draws
|
|
40175
|
-
a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
|
|
40176
|
-
debugging terrain and imagery rendering problems.
|
|
40182
|
+
* a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
|
|
40183
|
+
* debugging terrain and imagery rendering problems.
|
|
40177
40184
|
* @param [options] - Object describing initialization options
|
|
40178
40185
|
*/
|
|
40179
40186
|
export class TileCoordinatesImageryProvider {
|
|
40180
40187
|
constructor(options?: TileCoordinatesImageryProvider.ConstructorOptions);
|
|
40181
40188
|
/**
|
|
40182
40189
|
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
40183
|
-
|
|
40190
|
+
* 1.0 representing fully opaque.
|
|
40184
40191
|
*/
|
|
40185
40192
|
defaultAlpha: number | undefined;
|
|
40186
40193
|
/**
|
|
40187
40194
|
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
40188
|
-
|
|
40195
|
+
* 1.0 representing fully opaque.
|
|
40189
40196
|
*/
|
|
40190
40197
|
defaultNightAlpha: number | undefined;
|
|
40191
40198
|
/**
|
|
40192
40199
|
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
40193
|
-
|
|
40200
|
+
* 1.0 representing fully opaque.
|
|
40194
40201
|
*/
|
|
40195
40202
|
defaultDayAlpha: number | undefined;
|
|
40196
40203
|
/**
|
|
40197
40204
|
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
40198
|
-
|
|
40205
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
40199
40206
|
*/
|
|
40200
40207
|
defaultBrightness: number | undefined;
|
|
40201
40208
|
/**
|
|
40202
40209
|
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
40203
|
-
|
|
40210
|
+
* the contrast while greater than 1.0 increases it.
|
|
40204
40211
|
*/
|
|
40205
40212
|
defaultContrast: number | undefined;
|
|
40206
40213
|
/**
|
|
@@ -40209,7 +40216,7 @@ export class TileCoordinatesImageryProvider {
|
|
|
40209
40216
|
defaultHue: number | undefined;
|
|
40210
40217
|
/**
|
|
40211
40218
|
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
40212
|
-
|
|
40219
|
+
* saturation while greater than 1.0 increases it.
|
|
40213
40220
|
*/
|
|
40214
40221
|
defaultSaturation: number | undefined;
|
|
40215
40222
|
/**
|
|
@@ -40230,45 +40237,45 @@ export class TileCoordinatesImageryProvider {
|
|
|
40230
40237
|
readonly proxy: Proxy;
|
|
40231
40238
|
/**
|
|
40232
40239
|
* Gets the width of each tile, in pixels. This function should
|
|
40233
|
-
|
|
40240
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40234
40241
|
*/
|
|
40235
40242
|
readonly tileWidth: number;
|
|
40236
40243
|
/**
|
|
40237
40244
|
* Gets the height of each tile, in pixels. This function should
|
|
40238
|
-
|
|
40245
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40239
40246
|
*/
|
|
40240
40247
|
readonly tileHeight: number;
|
|
40241
40248
|
/**
|
|
40242
40249
|
* Gets the maximum level-of-detail that can be requested. This function should
|
|
40243
|
-
|
|
40250
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40244
40251
|
*/
|
|
40245
40252
|
readonly maximumLevel: number | undefined;
|
|
40246
40253
|
/**
|
|
40247
40254
|
* Gets the minimum level-of-detail that can be requested. This function should
|
|
40248
|
-
|
|
40255
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40249
40256
|
*/
|
|
40250
40257
|
readonly minimumLevel: number;
|
|
40251
40258
|
/**
|
|
40252
40259
|
* Gets the tiling scheme used by this provider. This function should
|
|
40253
|
-
|
|
40260
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40254
40261
|
*/
|
|
40255
40262
|
readonly tilingScheme: TilingScheme;
|
|
40256
40263
|
/**
|
|
40257
40264
|
* Gets the rectangle, in radians, of the imagery provided by this instance. This function should
|
|
40258
|
-
|
|
40265
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40259
40266
|
*/
|
|
40260
40267
|
readonly rectangle: Rectangle;
|
|
40261
40268
|
/**
|
|
40262
40269
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
40263
|
-
|
|
40264
|
-
|
|
40265
|
-
|
|
40270
|
+
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
40271
|
+
* returns undefined, no tiles are filtered. This function should
|
|
40272
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40266
40273
|
*/
|
|
40267
40274
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
40268
40275
|
/**
|
|
40269
40276
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
40270
|
-
|
|
40271
|
-
|
|
40277
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
40278
|
+
* are passed an instance of {@link TileProviderError}.
|
|
40272
40279
|
*/
|
|
40273
40280
|
readonly errorEvent: Event;
|
|
40274
40281
|
/**
|
|
@@ -40281,15 +40288,15 @@ export class TileCoordinatesImageryProvider {
|
|
|
40281
40288
|
readonly readyPromise: Promise<boolean>;
|
|
40282
40289
|
/**
|
|
40283
40290
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
40284
|
-
|
|
40291
|
+
* the source of the imagery. This function should not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40285
40292
|
*/
|
|
40286
40293
|
readonly credit: Credit;
|
|
40287
40294
|
/**
|
|
40288
40295
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
40289
|
-
|
|
40290
|
-
|
|
40291
|
-
|
|
40292
|
-
|
|
40296
|
+
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
40297
|
+
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
40298
|
+
* as if their alpha is 1.0 everywhere. Setting this property to false reduces memory usage
|
|
40299
|
+
* and texture upload time.
|
|
40293
40300
|
*/
|
|
40294
40301
|
readonly hasAlphaChannel: boolean;
|
|
40295
40302
|
/**
|
|
@@ -40302,29 +40309,29 @@ export class TileCoordinatesImageryProvider {
|
|
|
40302
40309
|
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
40303
40310
|
/**
|
|
40304
40311
|
* Requests the image for a given tile. This function should
|
|
40305
|
-
|
|
40312
|
+
* not be called before {@link TileCoordinatesImageryProvider#ready} returns true.
|
|
40306
40313
|
* @param x - The tile X coordinate.
|
|
40307
40314
|
* @param y - The tile Y coordinate.
|
|
40308
40315
|
* @param level - The tile level.
|
|
40309
40316
|
* @param [request] - The request object. Intended for internal use only.
|
|
40310
40317
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40318
|
+
* undefined if there are too many active requests to the server, and the request
|
|
40319
|
+
* should be retried later. The resolved image may be either an
|
|
40320
|
+
* Image or a Canvas DOM object.
|
|
40314
40321
|
*/
|
|
40315
40322
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<HTMLImageElement | HTMLCanvasElement> | undefined;
|
|
40316
40323
|
/**
|
|
40317
40324
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
40318
|
-
|
|
40325
|
+
* undefined.
|
|
40319
40326
|
* @param x - The tile X coordinate.
|
|
40320
40327
|
* @param y - The tile Y coordinate.
|
|
40321
40328
|
* @param level - The tile level.
|
|
40322
40329
|
* @param longitude - The longitude at which to pick features.
|
|
40323
40330
|
* @param latitude - The latitude at which to pick features.
|
|
40324
40331
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40332
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
40333
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
40334
|
+
* It may also be undefined if picking is not supported.
|
|
40328
40335
|
*/
|
|
40329
40336
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
40330
40337
|
}
|