mars3d-cesium 1.126.2 → 1.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Cesium/Cesium.d.ts +1319 -1199
- package/Build/Cesium/Cesium.js +15166 -15160
- package/Build/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
- package/Build/Cesium/Workers/chunk-3RGE4BXH.js +26 -0
- package/Build/Cesium/Workers/chunk-4GD3WQXO.js +26 -0
- package/Build/Cesium/Workers/chunk-4WWQMGPZ.js +26 -0
- package/Build/Cesium/Workers/chunk-5D2SH2FB.js +26 -0
- package/Build/Cesium/Workers/{chunk-ACQ7P2GP.js → chunk-7MDSSANJ.js} +2 -2
- package/Build/Cesium/Workers/{chunk-NUWAUNN2.js → chunk-7SDYTY36.js} +1 -1
- package/Build/Cesium/Workers/{chunk-6GA4Q2DK.js → chunk-AEMTUBUQ.js} +2 -2
- package/Build/Cesium/Workers/chunk-BF7B4FIR.js +26 -0
- package/Build/Cesium/Workers/chunk-BMX6TLUN.js +26 -0
- package/Build/Cesium/Workers/chunk-C3TBGSK2.js +26 -0
- package/Build/Cesium/Workers/chunk-CCGHELB6.js +26 -0
- package/Build/Cesium/Workers/{chunk-VPLHXR2B.js → chunk-CFEBEP3P.js} +2 -2
- package/Build/Cesium/Workers/chunk-CRNKVPOJ.js +28 -0
- package/Build/Cesium/Workers/{chunk-N3QEH6BC.js → chunk-CTPYY4AV.js} +2 -2
- package/Build/Cesium/Workers/chunk-D2WGDEJE.js +26 -0
- package/Build/Cesium/Workers/{chunk-7T7XMB3Y.js → chunk-G56ISPK7.js} +2 -2
- package/Build/Cesium/Workers/chunk-GDKDAUJU.js +26 -0
- package/Build/Cesium/Workers/{chunk-KOK32Q4J.js → chunk-GDY26PU3.js} +1 -1
- package/Build/Cesium/Workers/chunk-GSQ5TTBU.js +66 -0
- package/Build/Cesium/Workers/{chunk-RUVZSJPP.js → chunk-IO56Q3JU.js} +2 -2
- package/Build/Cesium/Workers/{chunk-CWP2SDHN.js → chunk-IQDUXDOM.js} +2 -2
- package/Build/Cesium/Workers/{chunk-2XH33C4K.js → chunk-JBTCQLOL.js} +2 -2
- package/Build/Cesium/Workers/chunk-KLDIEE7M.js +28 -0
- package/Build/Cesium/Workers/{chunk-3X7V2EO2.js → chunk-KNKD4BMR.js} +2 -2
- package/Build/Cesium/Workers/chunk-KOFJJPMR.js +26 -0
- package/Build/Cesium/Workers/{chunk-JTVNGPPR.js → chunk-LIPZ3Y6P.js} +2 -2
- package/Build/Cesium/Workers/chunk-LS5UR5C2.js +26 -0
- package/Build/Cesium/Workers/{chunk-BEEWJIFH.js → chunk-LSAQZ7SS.js} +1 -1
- package/Build/Cesium/Workers/chunk-LYLQXX76.js +26 -0
- package/Build/Cesium/Workers/chunk-MCJA36VG.js +26 -0
- package/Build/Cesium/Workers/{chunk-NPKJLKTD.js → chunk-MEQTML24.js} +2 -2
- package/Build/Cesium/Workers/chunk-MFFRMED2.js +26 -0
- package/Build/Cesium/Workers/chunk-MWHUXN6D.js +26 -0
- package/Build/Cesium/Workers/chunk-NPSDV7TS.js +26 -0
- package/Build/Cesium/Workers/{chunk-CJHX6SWR.js → chunk-OIUXC5BJ.js} +2 -2
- package/Build/Cesium/Workers/{chunk-SCYG2423.js → chunk-OVWSUJMR.js} +2 -2
- package/Build/Cesium/Workers/{chunk-3BJ2FCCQ.js → chunk-OYFDTV3B.js} +2 -2
- package/Build/Cesium/Workers/chunk-PJYH3HSV.js +26 -0
- package/Build/Cesium/Workers/chunk-Q6Z4RZDI.js +26 -0
- package/Build/Cesium/Workers/chunk-RESAW4MS.js +26 -0
- package/Build/Cesium/Workers/chunk-TEAUNO3N.js +26 -0
- package/Build/Cesium/Workers/chunk-TUKY3Z5P.js +26 -0
- package/Build/Cesium/Workers/chunk-TVNW7DCI.js +26 -0
- package/Build/Cesium/Workers/chunk-V3WA65AW.js +26 -0
- package/Build/Cesium/Workers/{chunk-4NTIZU6S.js → chunk-VC6LC2YG.js} +1 -1
- package/Build/Cesium/Workers/chunk-WJJZIIBB.js +26 -0
- package/Build/Cesium/Workers/chunk-XLU2AZ5W.js +26 -0
- package/Build/Cesium/Workers/chunk-YJ35UC5O.js +26 -0
- package/Build/Cesium/Workers/chunk-YTKWBMG6.js +26 -0
- package/Build/Cesium/Workers/chunk-Z5BNAGQ2.js +26 -0
- package/Build/Cesium/Workers/{chunk-KOZHD7LM.js → chunk-ZSUHEXD2.js} +2 -2
- package/Build/Cesium/Workers/combineGeometry.js +2 -2
- package/Build/Cesium/Workers/createBoxGeometry.js +2 -2
- package/Build/Cesium/Workers/createBoxOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCircleGeometry.js +2 -2
- package/Build/Cesium/Workers/createCircleOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/Build/Cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCorridorGeometry.js +2 -2
- package/Build/Cesium/Workers/createCorridorOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createCylinderGeometry.js +2 -2
- package/Build/Cesium/Workers/createCylinderOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipseGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipseOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipsoidGeometry.js +2 -2
- package/Build/Cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createFrustumGeometry.js +2 -2
- package/Build/Cesium/Workers/createFrustumOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createGeometry.js +2 -2
- package/Build/Cesium/Workers/createGroundPolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPlaneGeometry.js +2 -2
- package/Build/Cesium/Workers/createPlaneOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolygonGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolygonOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineVolumeGeometry.js +2 -2
- package/Build/Cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createRectangleGeometry.js +2 -2
- package/Build/Cesium/Workers/createRectangleOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createSimplePolylineGeometry.js +2 -2
- package/Build/Cesium/Workers/createSphereGeometry.js +2 -2
- package/Build/Cesium/Workers/createSphereOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/createTaskProcessorWorker.js +2 -2
- package/Build/Cesium/Workers/createVectorTileClampedPolylines.js +2 -2
- package/Build/Cesium/Workers/createVectorTileGeometries.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePoints.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePolygons.js +2 -2
- package/Build/Cesium/Workers/createVectorTilePolylines.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromHeightmap.js +2 -2
- package/Build/Cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/Workers/createWallGeometry.js +2 -2
- package/Build/Cesium/Workers/createWallOutlineGeometry.js +2 -2
- package/Build/Cesium/Workers/decodeDraco.js +2 -2
- package/Build/Cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Build/Cesium/Workers/decodeI3S.js +2 -2
- package/Build/Cesium/Workers/transcodeKTX2.js +14 -14
- package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/index.cjs +15181 -15175
- package/Build/Cesium/index.js +15170 -15164
- package/package.json +1 -1
- package/Build/Cesium/Workers/chunk-2ABBI2JG.js +0 -26
- package/Build/Cesium/Workers/chunk-463F4QGB.js +0 -26
- package/Build/Cesium/Workers/chunk-4RE5TK7J.js +0 -26
- package/Build/Cesium/Workers/chunk-6LYTDESA.js +0 -26
- package/Build/Cesium/Workers/chunk-6VAOYJ4Q.js +0 -26
- package/Build/Cesium/Workers/chunk-7JXUEP4W.js +0 -26
- package/Build/Cesium/Workers/chunk-AB73NGS3.js +0 -26
- package/Build/Cesium/Workers/chunk-ANR4IFD4.js +0 -26
- package/Build/Cesium/Workers/chunk-B4Q6LYZ2.js +0 -28
- package/Build/Cesium/Workers/chunk-BJSU2TZZ.js +0 -66
- package/Build/Cesium/Workers/chunk-BNNASHS5.js +0 -26
- package/Build/Cesium/Workers/chunk-C2P645MX.js +0 -26
- package/Build/Cesium/Workers/chunk-D3P7QTFD.js +0 -26
- package/Build/Cesium/Workers/chunk-D5LB274J.js +0 -26
- package/Build/Cesium/Workers/chunk-DJD6JBSI.js +0 -26
- package/Build/Cesium/Workers/chunk-EHAIRWUB.js +0 -26
- package/Build/Cesium/Workers/chunk-GEGB3K2H.js +0 -26
- package/Build/Cesium/Workers/chunk-H32B77KM.js +0 -26
- package/Build/Cesium/Workers/chunk-HJH5EDUI.js +0 -26
- package/Build/Cesium/Workers/chunk-JPDPEPPK.js +0 -26
- package/Build/Cesium/Workers/chunk-JS26HL3Y.js +0 -26
- package/Build/Cesium/Workers/chunk-LSHHQNGK.js +0 -26
- package/Build/Cesium/Workers/chunk-P5AD4E2S.js +0 -26
- package/Build/Cesium/Workers/chunk-RLNLNL6Y.js +0 -26
- package/Build/Cesium/Workers/chunk-RTA74CJX.js +0 -26
- package/Build/Cesium/Workers/chunk-TGLCLO5X.js +0 -26
- package/Build/Cesium/Workers/chunk-TYCSUVZ4.js +0 -26
- package/Build/Cesium/Workers/chunk-VEIGU5F3.js +0 -26
- package/Build/Cesium/Workers/chunk-VJ3OOPD5.js +0 -28
- package/Build/Cesium/Workers/chunk-XQZVE3TB.js +0 -26
- package/Build/Cesium/Workers/chunk-XRDG5LN7.js +0 -26
- package/Build/Cesium/Workers/chunk-YB2RTWOV.js +0 -26
- package/Build/Cesium/Workers/chunk-YX3IB3TK.js +0 -26
package/Build/Cesium/Cesium.d.ts
CHANGED
|
@@ -653,7 +653,7 @@ export class ArcGISTiledElevationTerrainProvider {
|
|
|
653
653
|
at points and in rectangles. This property may be undefined if availability
|
|
654
654
|
information is not available.
|
|
655
655
|
*/
|
|
656
|
-
readonly availability: TileAvailability;
|
|
656
|
+
readonly availability: TileAvailability | undefined;
|
|
657
657
|
/**
|
|
658
658
|
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
|
|
659
659
|
retrieved from Elevation Tiles of an an ArcGIS ImageService.
|
|
@@ -2976,7 +2976,7 @@ export class CesiumTerrainProvider {
|
|
|
2976
2976
|
exists deeper in the tree rather than it all being discoverable at the root. However, a tile that
|
|
2977
2977
|
is available now will not become unavailable in the future.
|
|
2978
2978
|
*/
|
|
2979
|
-
readonly availability: TileAvailability;
|
|
2979
|
+
readonly availability: TileAvailability | undefined;
|
|
2980
2980
|
/**
|
|
2981
2981
|
* Gets the maximum geometric error allowed in a tile at a given level.
|
|
2982
2982
|
* @param level - The tile level for which to get the maximum geometric error.
|
|
@@ -6436,7 +6436,7 @@ export class EllipsoidRhumbLine {
|
|
|
6436
6436
|
interpolateUsingSurfaceDistance(distance: number, result?: Cartographic): Cartographic;
|
|
6437
6437
|
/**
|
|
6438
6438
|
* Provides the location of a point at the indicated longitude along the rhumb line.
|
|
6439
|
-
|
|
6439
|
+
If the longitude is outside the range of start and end points, the first intersection with the longitude from the start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
|
|
6440
6440
|
* @param intersectionLongitude - The longitude, in radians, at which to find the intersection point from the starting point using the heading.
|
|
6441
6441
|
* @param [result] - The object in which to store the result.
|
|
6442
6442
|
* @returns The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
|
|
@@ -6444,7 +6444,7 @@ export class EllipsoidRhumbLine {
|
|
|
6444
6444
|
findIntersectionWithLongitude(intersectionLongitude: number, result?: Cartographic): Cartographic;
|
|
6445
6445
|
/**
|
|
6446
6446
|
* Provides the location of a point at the indicated latitude along the rhumb line.
|
|
6447
|
-
|
|
6447
|
+
If the latitude is outside the range of start and end points, the first intersection with the latitude from that start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
|
|
6448
6448
|
* @param intersectionLatitude - The latitude, in radians, at which to find the intersection point from the starting point using the heading.
|
|
6449
6449
|
* @param [result] - The object in which to store the result.
|
|
6450
6450
|
* @returns The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
|
|
@@ -6584,7 +6584,7 @@ export class EllipsoidTerrainProvider {
|
|
|
6584
6584
|
at points and in rectangles. This property may be undefined if availability
|
|
6585
6585
|
information is not available.
|
|
6586
6586
|
*/
|
|
6587
|
-
readonly availability: TileAvailability;
|
|
6587
|
+
readonly availability: TileAvailability | undefined;
|
|
6588
6588
|
/**
|
|
6589
6589
|
* Requests the geometry for a given tile. The result includes terrain
|
|
6590
6590
|
data and indicates that all child tiles are available.
|
|
@@ -6796,6 +6796,22 @@ properties, otherwise, falls back on toString().
|
|
|
6796
6796
|
*/
|
|
6797
6797
|
export function formatError(object: any): string;
|
|
6798
6798
|
|
|
6799
|
+
/**
|
|
6800
|
+
* Utilities helpful for setting a default value for a parameter.
|
|
6801
|
+
*/
|
|
6802
|
+
export namespace Frozen {
|
|
6803
|
+
/**
|
|
6804
|
+
* A frozen empty object that can be used as the default value for options passed as
|
|
6805
|
+
an object literal.
|
|
6806
|
+
*/
|
|
6807
|
+
var EMPTY_OBJECT: any;
|
|
6808
|
+
/**
|
|
6809
|
+
* A frozen empty array that can be used as the default value for options passed as
|
|
6810
|
+
an array literal.
|
|
6811
|
+
*/
|
|
6812
|
+
var EMPTY_ARRAY: any[];
|
|
6813
|
+
}
|
|
6814
|
+
|
|
6799
6815
|
/**
|
|
6800
6816
|
* Describes a frustum at the given the origin and orientation.
|
|
6801
6817
|
* @param options - Object with the following properties:
|
|
@@ -7857,7 +7873,7 @@ export class GoogleEarthEnterpriseTerrainData {
|
|
|
7857
7873
|
Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
|
|
7858
7874
|
Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
|
|
7859
7875
|
*/
|
|
7860
|
-
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement;
|
|
7876
|
+
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
|
|
7861
7877
|
/**
|
|
7862
7878
|
* Computes the terrain height at a specified longitude and latitude.
|
|
7863
7879
|
* @param rectangle - The rectangle covered by this terrain data.
|
|
@@ -7968,7 +7984,7 @@ export class GoogleEarthEnterpriseTerrainProvider {
|
|
|
7968
7984
|
at points and in rectangles. This property may be undefined if availability
|
|
7969
7985
|
information is not available.
|
|
7970
7986
|
*/
|
|
7971
|
-
readonly availability: TileAvailability;
|
|
7987
|
+
readonly availability: TileAvailability | undefined;
|
|
7972
7988
|
/**
|
|
7973
7989
|
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
|
|
7974
7990
|
* @example
|
|
@@ -8398,7 +8414,7 @@ export class HeightmapTerrainData {
|
|
|
8398
8414
|
Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
|
|
8399
8415
|
Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
|
|
8400
8416
|
*/
|
|
8401
|
-
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement;
|
|
8417
|
+
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
|
|
8402
8418
|
/**
|
|
8403
8419
|
* Computes the terrain height at a specified longitude and latitude.
|
|
8404
8420
|
* @param rectangle - The rectangle covered by this terrain data.
|
|
@@ -9171,8 +9187,17 @@ export namespace ITwinPlatform {
|
|
|
9171
9187
|
}
|
|
9172
9188
|
/**
|
|
9173
9189
|
* Gets or sets the default iTwin access token. This token should have the <code>itwin-platform</code> scope.
|
|
9190
|
+
|
|
9191
|
+
This value will be ignored if {@link ITwinPlatform.defaultShareKey} is defined.
|
|
9174
9192
|
*/
|
|
9175
9193
|
var defaultAccessToken: string | undefined;
|
|
9194
|
+
/**
|
|
9195
|
+
* Gets or sets the default iTwin share key. If this value is provided it will override {@link ITwinPlatform.defaultAccessToken} in all requests.
|
|
9196
|
+
|
|
9197
|
+
Share keys can be generated using the iTwin Shares api
|
|
9198
|
+
https://developer.bentley.com/apis/access-control-v2/operations/create-itwin-share/
|
|
9199
|
+
*/
|
|
9200
|
+
var defaultShareKey: string | undefined;
|
|
9176
9201
|
/**
|
|
9177
9202
|
* Gets or sets the default iTwin API endpoint.
|
|
9178
9203
|
*/
|
|
@@ -12501,19 +12526,19 @@ export class OrthographicFrustum {
|
|
|
12501
12526
|
|
|
12502
12527
|
/**
|
|
12503
12528
|
* The viewing frustum is defined by 6 planes.
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12529
|
+
Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
12530
|
+
define the unit vector normal to the plane, and the w component is the distance of the
|
|
12531
|
+
plane from the origin/camera position.
|
|
12507
12532
|
* @example
|
|
12508
12533
|
* const maxRadii = ellipsoid.maximumRadius;
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12534
|
+
|
|
12535
|
+
const frustum = new Cesium.OrthographicOffCenterFrustum();
|
|
12536
|
+
frustum.right = maxRadii * Cesium.Math.PI;
|
|
12537
|
+
frustum.left = -c.frustum.right;
|
|
12538
|
+
frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth);
|
|
12539
|
+
frustum.bottom = -c.frustum.top;
|
|
12540
|
+
frustum.near = 0.01 * maxRadii;
|
|
12541
|
+
frustum.far = 50.0 * maxRadii;
|
|
12517
12542
|
* @param [options] - An object with the following properties:
|
|
12518
12543
|
* @param [options.left] - The left clipping plane distance.
|
|
12519
12544
|
* @param [options.right] - The right clipping plane distance.
|
|
@@ -12563,8 +12588,8 @@ export class OrthographicOffCenterFrustum {
|
|
|
12563
12588
|
* Creates a culling volume for this frustum.
|
|
12564
12589
|
* @example
|
|
12565
12590
|
* // Check if a bounding volume intersects the frustum.
|
|
12566
|
-
|
|
12567
|
-
|
|
12591
|
+
const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
|
|
12592
|
+
const intersect = cullingVolume.computeVisibility(boundingVolume);
|
|
12568
12593
|
* @param position - The eye position.
|
|
12569
12594
|
* @param direction - The view direction.
|
|
12570
12595
|
* @param up - The up direction.
|
|
@@ -12575,8 +12600,8 @@ export class OrthographicOffCenterFrustum {
|
|
|
12575
12600
|
* Returns the pixel's width and height in meters.
|
|
12576
12601
|
* @example
|
|
12577
12602
|
* // Example 1
|
|
12578
|
-
|
|
12579
|
-
|
|
12603
|
+
// Get the width and height of a pixel.
|
|
12604
|
+
const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, scene.pixelRatio, new Cesium.Cartesian2());
|
|
12580
12605
|
* @param drawingBufferWidth - The width of the drawing buffer.
|
|
12581
12606
|
* @param drawingBufferHeight - The height of the drawing buffer.
|
|
12582
12607
|
* @param distance - The distance to the near plane in meters.
|
|
@@ -12593,15 +12618,15 @@ export class OrthographicOffCenterFrustum {
|
|
|
12593
12618
|
clone(result?: OrthographicOffCenterFrustum): OrthographicOffCenterFrustum;
|
|
12594
12619
|
/**
|
|
12595
12620
|
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
|
|
12596
|
-
|
|
12621
|
+
<code>true</code> if they are equal, <code>false</code> otherwise.
|
|
12597
12622
|
* @param [other] - The right hand side OrthographicOffCenterFrustum.
|
|
12598
12623
|
* @returns <code>true</code> if they are equal, <code>false</code> otherwise.
|
|
12599
12624
|
*/
|
|
12600
12625
|
equals(other?: OrthographicOffCenterFrustum): boolean;
|
|
12601
12626
|
/**
|
|
12602
12627
|
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
|
|
12603
|
-
|
|
12604
|
-
|
|
12628
|
+
<code>true</code> if they pass an absolute or relative tolerance test,
|
|
12629
|
+
<code>false</code> otherwise.
|
|
12605
12630
|
* @param other - The right hand side OrthographicOffCenterFrustum.
|
|
12606
12631
|
* @param relativeEpsilon - The relative epsilon tolerance to use for equality testing.
|
|
12607
12632
|
* @param [absoluteEpsilon = relativeEpsilon] - The absolute epsilon tolerance to use for equality testing.
|
|
@@ -14016,7 +14041,7 @@ export class QuantizedMeshTerrainData {
|
|
|
14016
14041
|
Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
|
|
14017
14042
|
Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
|
|
14018
14043
|
*/
|
|
14019
|
-
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement;
|
|
14044
|
+
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
|
|
14020
14045
|
/**
|
|
14021
14046
|
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
|
|
14022
14047
|
vertices in this instance, interpolated if necessary.
|
|
@@ -14043,7 +14068,7 @@ export class QuantizedMeshTerrainData {
|
|
|
14043
14068
|
interpolateHeight(rectangle: Rectangle, longitude: number, latitude: number): number;
|
|
14044
14069
|
/**
|
|
14045
14070
|
* Determines if a given child tile is available, based on the
|
|
14046
|
-
{@link
|
|
14071
|
+
{@link QuantizedMeshTerrainData.childTileMask}. The given child tile coordinates are assumed
|
|
14047
14072
|
to be one of the four children of this tile. If non-child tile coordinates are
|
|
14048
14073
|
given, the availability of the southeast child tile is returned.
|
|
14049
14074
|
* @param thisX - The tile X coordinate of this (the parent) tile.
|
|
@@ -16219,7 +16244,7 @@ export namespace ScreenSpaceEventHandler {
|
|
|
16219
16244
|
|
|
16220
16245
|
/**
|
|
16221
16246
|
* Handles user input events. Custom functions can be added to be executed on
|
|
16222
|
-
|
|
16247
|
+
when the user enters input.
|
|
16223
16248
|
* @param [element = document] - The element to add events to.
|
|
16224
16249
|
*/
|
|
16225
16250
|
export class ScreenSpaceEventHandler {
|
|
@@ -16229,14 +16254,14 @@ export class ScreenSpaceEventHandler {
|
|
|
16229
16254
|
* @param action - Function to be executed when the input event occurs.
|
|
16230
16255
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16231
16256
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16232
|
-
|
|
16257
|
+
event occurs.
|
|
16233
16258
|
*/
|
|
16234
16259
|
setInputAction(action: ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback, type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): void;
|
|
16235
16260
|
/**
|
|
16236
16261
|
* Returns the function to be executed on an input event.
|
|
16237
16262
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16238
16263
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16239
|
-
|
|
16264
|
+
event occurs.
|
|
16240
16265
|
* @returns The function to be executed on an input event.
|
|
16241
16266
|
*/
|
|
16242
16267
|
getInputAction(type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback;
|
|
@@ -16244,35 +16269,35 @@ export class ScreenSpaceEventHandler {
|
|
|
16244
16269
|
* Removes the function to be executed on an input event.
|
|
16245
16270
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16246
16271
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16247
|
-
|
|
16272
|
+
event occurs.
|
|
16248
16273
|
*/
|
|
16249
16274
|
removeInputAction(type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): void;
|
|
16250
16275
|
/**
|
|
16251
16276
|
* Returns true if this object was destroyed; otherwise, false.
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16277
|
+
<br /><br />
|
|
16278
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
16279
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
16255
16280
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
16256
16281
|
*/
|
|
16257
16282
|
isDestroyed(): boolean;
|
|
16258
16283
|
/**
|
|
16259
16284
|
* Removes listeners held by this object.
|
|
16260
|
-
|
|
16261
|
-
|
|
16262
|
-
|
|
16263
|
-
|
|
16285
|
+
<br /><br />
|
|
16286
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
16287
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
16288
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
16264
16289
|
* @example
|
|
16265
16290
|
* handler = handler && handler.destroy();
|
|
16266
16291
|
*/
|
|
16267
16292
|
destroy(): void;
|
|
16268
16293
|
/**
|
|
16269
16294
|
* The amount of time, in milliseconds, that mouse events will be disabled after
|
|
16270
|
-
|
|
16295
|
+
receiving any touch events, such that any emulated mouse events will be ignored.
|
|
16271
16296
|
*/
|
|
16272
16297
|
static mouseEmulationIgnoreMilliseconds: number;
|
|
16273
16298
|
/**
|
|
16274
16299
|
* The amount of time, in milliseconds, before a touch on the screen becomes a
|
|
16275
|
-
|
|
16300
|
+
touch and hold.
|
|
16276
16301
|
*/
|
|
16277
16302
|
static touchHoldDelayMilliseconds: number;
|
|
16278
16303
|
}
|
|
@@ -16871,7 +16896,7 @@ export class TerrainData {
|
|
|
16871
16896
|
Uint8Array or image where a value of 255 indicates water and a value of 0 indicates land.
|
|
16872
16897
|
Values in between 0 and 255 are allowed as well to smoothly blend between land and water.
|
|
16873
16898
|
*/
|
|
16874
|
-
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement;
|
|
16899
|
+
waterMask: Uint8Array | HTMLImageElement | HTMLCanvasElement | undefined;
|
|
16875
16900
|
/**
|
|
16876
16901
|
* Computes the terrain height at a specified longitude and latitude.
|
|
16877
16902
|
* @param rectangle - The rectangle covered by this terrain data.
|
|
@@ -16963,7 +16988,7 @@ export class TerrainProvider {
|
|
|
16963
16988
|
at points and in rectangles. This property may be undefined if availability
|
|
16964
16989
|
information is not available.
|
|
16965
16990
|
*/
|
|
16966
|
-
readonly availability: TileAvailability;
|
|
16991
|
+
readonly availability: TileAvailability | undefined;
|
|
16967
16992
|
/**
|
|
16968
16993
|
* Gets a list of indices for a triangle mesh representing a regular grid. Calling
|
|
16969
16994
|
this function multiple times with the same grid width and height returns the
|
|
@@ -18351,7 +18376,7 @@ export class VRTheWorldTerrainProvider {
|
|
|
18351
18376
|
at points and in rectangles. This property may be undefined if availability
|
|
18352
18377
|
information is not available.
|
|
18353
18378
|
*/
|
|
18354
|
-
readonly availability: TileAvailability;
|
|
18379
|
+
readonly availability: TileAvailability | undefined;
|
|
18355
18380
|
/**
|
|
18356
18381
|
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
|
|
18357
18382
|
retrieved from a {@link http://vr-theworld.com/|VT MÄK VR-TheWorld server}.
|
|
@@ -21880,10 +21905,10 @@ export class GeometryVisualizer {
|
|
|
21880
21905
|
constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection);
|
|
21881
21906
|
/**
|
|
21882
21907
|
* Updates all of the primitives created by this visualizer to match their
|
|
21883
|
-
|
|
21908
|
+
Entity counterpart at the given time.
|
|
21884
21909
|
* @param time - The time to update to.
|
|
21885
21910
|
* @returns True if the visualizer successfully updated to the provided time,
|
|
21886
|
-
|
|
21911
|
+
false if the visualizer is waiting for asynchronous primitives to be created.
|
|
21887
21912
|
*/
|
|
21888
21913
|
update(time: JulianDate): boolean;
|
|
21889
21914
|
/**
|
|
@@ -24099,10 +24124,10 @@ export class PolylineVisualizer {
|
|
|
24099
24124
|
constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection);
|
|
24100
24125
|
/**
|
|
24101
24126
|
* Updates all of the primitives created by this visualizer to match their
|
|
24102
|
-
|
|
24127
|
+
Entity counterpart at the given time.
|
|
24103
24128
|
* @param time - The time to update to.
|
|
24104
24129
|
* @returns True if the visualizer successfully updated to the provided time,
|
|
24105
|
-
|
|
24130
|
+
false if the visualizer is waiting for asynchronous primitives to be created.
|
|
24106
24131
|
*/
|
|
24107
24132
|
update(time: JulianDate): boolean;
|
|
24108
24133
|
/**
|
|
@@ -26386,11 +26411,11 @@ export class Billboard {
|
|
|
26386
26411
|
/**
|
|
26387
26412
|
* Gets or sets a width for the billboard. If undefined, the image width will be used.
|
|
26388
26413
|
*/
|
|
26389
|
-
width: number;
|
|
26414
|
+
width: number | undefined;
|
|
26390
26415
|
/**
|
|
26391
26416
|
* Gets or sets a height for the billboard. If undefined, the image height will be used.
|
|
26392
26417
|
*/
|
|
26393
|
-
height: number;
|
|
26418
|
+
height: number | undefined;
|
|
26394
26419
|
/**
|
|
26395
26420
|
* Gets or sets if the billboard size is in meters or pixels. <code>true</code> to size the billboard in meters;
|
|
26396
26421
|
otherwise, the size is in pixels.
|
|
@@ -26593,7 +26618,7 @@ export class BillboardCollection {
|
|
|
26593
26618
|
{@link BillboardCollection#get} to iterate over all the billboards
|
|
26594
26619
|
in the collection.
|
|
26595
26620
|
*/
|
|
26596
|
-
length: number;
|
|
26621
|
+
readonly length: number;
|
|
26597
26622
|
/**
|
|
26598
26623
|
* Creates and adds a billboard with the specified initial properties to the collection.
|
|
26599
26624
|
The added billboard is returned so it can be modified or removed from the collection later.
|
|
@@ -27107,23 +27132,23 @@ export type HeadingPitchRollValues = {
|
|
|
27107
27132
|
|
|
27108
27133
|
/**
|
|
27109
27134
|
* The camera is defined by a position, orientation, and view frustum.
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27135
|
+
<br /><br />
|
|
27136
|
+
The orientation forms an orthonormal basis with a view, up and right = view x up unit vectors.
|
|
27137
|
+
<br /><br />
|
|
27138
|
+
The viewing frustum is defined by 6 planes.
|
|
27139
|
+
Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
27140
|
+
define the unit vector normal to the plane, and the w component is the distance of the
|
|
27141
|
+
plane from the origin/camera position.
|
|
27117
27142
|
* @example
|
|
27118
27143
|
* // Create a camera looking down the negative z-axis, positioned at the origin,
|
|
27119
|
-
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
|
|
27126
|
-
|
|
27144
|
+
// with a field of view of 60 degrees, and 1:1 aspect ratio.
|
|
27145
|
+
const camera = new Cesium.Camera(scene);
|
|
27146
|
+
camera.position = new Cesium.Cartesian3();
|
|
27147
|
+
camera.direction = Cesium.Cartesian3.negate(Cesium.Cartesian3.UNIT_Z, new Cesium.Cartesian3());
|
|
27148
|
+
camera.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Y);
|
|
27149
|
+
camera.frustum.fov = Cesium.Math.PI_OVER_THREE;
|
|
27150
|
+
camera.frustum.near = 1.0;
|
|
27151
|
+
camera.frustum.far = 2.0;
|
|
27127
27152
|
* @param scene - The scene.
|
|
27128
27153
|
*/
|
|
27129
27154
|
export class Camera {
|
|
@@ -27150,22 +27175,22 @@ export class Camera {
|
|
|
27150
27175
|
frustum: PerspectiveFrustum | PerspectiveOffCenterFrustum | OrthographicFrustum;
|
|
27151
27176
|
/**
|
|
27152
27177
|
* The default amount to move the camera when an argument is not
|
|
27153
|
-
|
|
27178
|
+
provided to the move methods.
|
|
27154
27179
|
*/
|
|
27155
27180
|
defaultMoveAmount: number;
|
|
27156
27181
|
/**
|
|
27157
27182
|
* The default amount to rotate the camera when an argument is not
|
|
27158
|
-
|
|
27183
|
+
provided to the look methods.
|
|
27159
27184
|
*/
|
|
27160
27185
|
defaultLookAmount: number;
|
|
27161
27186
|
/**
|
|
27162
27187
|
* The default amount to rotate the camera when an argument is not
|
|
27163
|
-
|
|
27188
|
+
provided to the rotate methods.
|
|
27164
27189
|
*/
|
|
27165
27190
|
defaultRotateAmount: number;
|
|
27166
27191
|
/**
|
|
27167
27192
|
* The default amount to move the camera when an argument is not
|
|
27168
|
-
|
|
27193
|
+
provided to the zoom methods.
|
|
27169
27194
|
*/
|
|
27170
27195
|
defaultZoomAmount: number;
|
|
27171
27196
|
/**
|
|
@@ -27174,7 +27199,7 @@ export class Camera {
|
|
|
27174
27199
|
constrainedAxis: Cartesian3 | undefined;
|
|
27175
27200
|
/**
|
|
27176
27201
|
* The factor multiplied by the the map size used to determine where to clamp the camera position
|
|
27177
|
-
|
|
27202
|
+
when zooming out from the surface. The default is 1.5. Only valid for 2D and the map is rotatable.
|
|
27178
27203
|
*/
|
|
27179
27204
|
maximumZoomFactor: number;
|
|
27180
27205
|
/**
|
|
@@ -27187,8 +27212,8 @@ export class Camera {
|
|
|
27187
27212
|
static DEFAULT_VIEW_RECTANGLE: Rectangle;
|
|
27188
27213
|
/**
|
|
27189
27214
|
* A scalar to multiply to the camera position and add it back after setting the camera to view the rectangle.
|
|
27190
|
-
|
|
27191
|
-
|
|
27215
|
+
A value of zero means the camera will view the entire {@link Camera#DEFAULT_VIEW_RECTANGLE}, a value greater than zero
|
|
27216
|
+
will move it further away from the extent, and a value less than zero will move it close to the extent.
|
|
27192
27217
|
*/
|
|
27193
27218
|
static DEFAULT_VIEW_FACTOR: number;
|
|
27194
27219
|
/**
|
|
@@ -27213,9 +27238,9 @@ export class Camera {
|
|
|
27213
27238
|
readonly inverseViewMatrix: Matrix4;
|
|
27214
27239
|
/**
|
|
27215
27240
|
* Gets the {@link Cartographic} position of the camera, with longitude and latitude
|
|
27216
|
-
|
|
27217
|
-
|
|
27218
|
-
|
|
27241
|
+
expressed in radians and height in meters. In 2D and Columbus View, it is possible
|
|
27242
|
+
for the returned longitude and latitude to be outside the range of valid longitudes
|
|
27243
|
+
and latitudes when the camera is outside the map.
|
|
27219
27244
|
*/
|
|
27220
27245
|
readonly positionCartographic: Cartographic;
|
|
27221
27246
|
/**
|
|
@@ -27262,48 +27287,48 @@ export class Camera {
|
|
|
27262
27287
|
* Sets the camera position, orientation and transform.
|
|
27263
27288
|
* @example
|
|
27264
27289
|
* // 1. Set position with a top-down view
|
|
27265
|
-
|
|
27266
|
-
|
|
27267
|
-
|
|
27268
|
-
|
|
27269
|
-
|
|
27270
|
-
|
|
27271
|
-
|
|
27272
|
-
|
|
27273
|
-
|
|
27274
|
-
|
|
27275
|
-
|
|
27276
|
-
|
|
27277
|
-
|
|
27278
|
-
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
|
|
27287
|
-
|
|
27288
|
-
|
|
27289
|
-
|
|
27290
|
-
|
|
27291
|
-
|
|
27292
|
-
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
|
|
27298
|
-
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
|
|
27290
|
+
viewer.camera.setView({
|
|
27291
|
+
destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
|
|
27292
|
+
});
|
|
27293
|
+
|
|
27294
|
+
// 2 Set view with heading, pitch and roll
|
|
27295
|
+
viewer.camera.setView({
|
|
27296
|
+
destination : cartesianPosition,
|
|
27297
|
+
orientation: {
|
|
27298
|
+
heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
|
|
27299
|
+
pitch : Cesium.Math.toRadians(-90), // default value (looking down)
|
|
27300
|
+
roll : 0.0 // default value
|
|
27301
|
+
}
|
|
27302
|
+
});
|
|
27303
|
+
|
|
27304
|
+
// 3. Change heading, pitch and roll with the camera position remaining the same.
|
|
27305
|
+
viewer.camera.setView({
|
|
27306
|
+
orientation: {
|
|
27307
|
+
heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
|
|
27308
|
+
pitch : Cesium.Math.toRadians(-90), // default value (looking down)
|
|
27309
|
+
roll : 0.0 // default value
|
|
27310
|
+
}
|
|
27311
|
+
});
|
|
27312
|
+
|
|
27313
|
+
|
|
27314
|
+
// 4. View rectangle with a top-down view
|
|
27315
|
+
viewer.camera.setView({
|
|
27316
|
+
destination : Cesium.Rectangle.fromDegrees(west, south, east, north)
|
|
27317
|
+
});
|
|
27318
|
+
|
|
27319
|
+
// 5. Set position with an orientation using unit vectors.
|
|
27320
|
+
viewer.camera.setView({
|
|
27321
|
+
destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27322
|
+
orientation : {
|
|
27323
|
+
direction : new Cesium.Cartesian3(-0.04231243104240401, -0.20123236049443421, -0.97862924300734),
|
|
27324
|
+
up : new Cesium.Cartesian3(-0.47934589305293746, -0.8553216253114552, 0.1966022179118339)
|
|
27325
|
+
}
|
|
27326
|
+
});
|
|
27302
27327
|
* @param options - Object with the following properties:
|
|
27303
27328
|
* @param [options.destination] - The final position of the camera in world coordinates or a rectangle that would be visible from a top-down view.
|
|
27304
27329
|
* @param [options.orientation] - An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
|
|
27305
|
-
|
|
27306
|
-
|
|
27330
|
+
towards the center of the frame in 3D and in the negative z direction in Columbus view. The up direction will point towards local north in 3D and in the positive
|
|
27331
|
+
y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
|
|
27307
27332
|
* @param [options.endTransform] - Transform matrix representing the reference frame of the camera.
|
|
27308
27333
|
* @param [options.convert] - Whether to convert the destination from world coordinates to scene coordinates (only relevant when not using 3D). Defaults to <code>true</code>.
|
|
27309
27334
|
*/
|
|
@@ -27315,8 +27340,8 @@ export class Camera {
|
|
|
27315
27340
|
}): void;
|
|
27316
27341
|
/**
|
|
27317
27342
|
* Fly the camera to the home view. Use {@link Camera#.DEFAULT_VIEW_RECTANGLE} to set
|
|
27318
|
-
|
|
27319
|
-
|
|
27343
|
+
the default view for the 3D scene. The home view for 2D and columbus view shows the
|
|
27344
|
+
entire map.
|
|
27320
27345
|
* @param [duration] - The duration of the flight in seconds. If omitted, Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight. See {@link Camera#flyTo}
|
|
27321
27346
|
*/
|
|
27322
27347
|
flyHome(duration?: number): void;
|
|
@@ -27370,14 +27395,14 @@ export class Camera {
|
|
|
27370
27395
|
move(direction: Cartesian3, amount?: number): void;
|
|
27371
27396
|
/**
|
|
27372
27397
|
* Translates the camera's position by <code>amount</code> along the camera's view vector.
|
|
27373
|
-
|
|
27398
|
+
When in 2D mode, this will zoom in the camera instead of translating the camera's position.
|
|
27374
27399
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27375
27400
|
*/
|
|
27376
27401
|
moveForward(amount?: number): void;
|
|
27377
27402
|
/**
|
|
27378
27403
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27379
|
-
|
|
27380
|
-
|
|
27404
|
+
of the camera's view vector.
|
|
27405
|
+
When in 2D mode, this will zoom out the camera instead of translating the camera's position.
|
|
27381
27406
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27382
27407
|
*/
|
|
27383
27408
|
moveBackward(amount?: number): void;
|
|
@@ -27388,7 +27413,7 @@ export class Camera {
|
|
|
27388
27413
|
moveUp(amount?: number): void;
|
|
27389
27414
|
/**
|
|
27390
27415
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27391
|
-
|
|
27416
|
+
of the camera's up vector.
|
|
27392
27417
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27393
27418
|
*/
|
|
27394
27419
|
moveDown(amount?: number): void;
|
|
@@ -27399,31 +27424,31 @@ export class Camera {
|
|
|
27399
27424
|
moveRight(amount?: number): void;
|
|
27400
27425
|
/**
|
|
27401
27426
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27402
|
-
|
|
27427
|
+
of the camera's right vector.
|
|
27403
27428
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27404
27429
|
*/
|
|
27405
27430
|
moveLeft(amount?: number): void;
|
|
27406
27431
|
/**
|
|
27407
27432
|
* Rotates the camera around its up vector by amount, in radians, in the opposite direction
|
|
27408
|
-
|
|
27433
|
+
of its right vector if not in 2D mode.
|
|
27409
27434
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27410
27435
|
*/
|
|
27411
27436
|
lookLeft(amount?: number): void;
|
|
27412
27437
|
/**
|
|
27413
27438
|
* Rotates the camera around its up vector by amount, in radians, in the direction
|
|
27414
|
-
|
|
27439
|
+
of its right vector if not in 2D mode.
|
|
27415
27440
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27416
27441
|
*/
|
|
27417
27442
|
lookRight(amount?: number): void;
|
|
27418
27443
|
/**
|
|
27419
27444
|
* Rotates the camera around its right vector by amount, in radians, in the direction
|
|
27420
|
-
|
|
27445
|
+
of its up vector if not in 2D mode.
|
|
27421
27446
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27422
27447
|
*/
|
|
27423
27448
|
lookUp(amount?: number): void;
|
|
27424
27449
|
/**
|
|
27425
27450
|
* Rotates the camera around its right vector by amount, in radians, in the opposite direction
|
|
27426
|
-
|
|
27451
|
+
of its up vector if not in 2D mode.
|
|
27427
27452
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27428
27453
|
*/
|
|
27429
27454
|
lookDown(amount?: number): void;
|
|
@@ -27445,7 +27470,7 @@ export class Camera {
|
|
|
27445
27470
|
twistRight(amount?: number): void;
|
|
27446
27471
|
/**
|
|
27447
27472
|
* Rotates the camera around <code>axis</code> by <code>angle</code>. The distance
|
|
27448
|
-
|
|
27473
|
+
of the camera's position to the center of the camera's reference frame remains the same.
|
|
27449
27474
|
* @param axis - The axis to rotate around given in world coordinates.
|
|
27450
27475
|
* @param [angle] - The angle, in radians, to rotate by. Defaults to <code>defaultRotateAmount</code>.
|
|
27451
27476
|
*/
|
|
@@ -27477,63 +27502,63 @@ export class Camera {
|
|
|
27477
27502
|
zoomIn(amount?: number): void;
|
|
27478
27503
|
/**
|
|
27479
27504
|
* Zooms <code>amount</code> along the opposite direction of
|
|
27480
|
-
|
|
27505
|
+
the camera's view vector.
|
|
27481
27506
|
* @param [amount] - The amount to move. Defaults to <code>defaultZoomAmount</code>.
|
|
27482
27507
|
*/
|
|
27483
27508
|
zoomOut(amount?: number): void;
|
|
27484
27509
|
/**
|
|
27485
27510
|
* Gets the magnitude of the camera position. In 3D, this is the vector magnitude. In 2D and
|
|
27486
|
-
|
|
27511
|
+
Columbus view, this is the distance to the map.
|
|
27487
27512
|
* @returns The magnitude of the position.
|
|
27488
27513
|
*/
|
|
27489
27514
|
getMagnitude(): number;
|
|
27490
27515
|
/**
|
|
27491
27516
|
* Sets the camera position and orientation using a target and offset. The target must be given in
|
|
27492
|
-
|
|
27493
|
-
|
|
27494
|
-
|
|
27495
|
-
|
|
27496
|
-
|
|
27497
|
-
|
|
27498
|
-
|
|
27499
|
-
|
|
27500
|
-
|
|
27517
|
+
world coordinates. The offset can be either a cartesian or heading/pitch/range in the local east-north-up reference frame centered at the target.
|
|
27518
|
+
If the offset is a cartesian, then it is an offset from the center of the reference frame defined by the transformation matrix. If the offset
|
|
27519
|
+
is heading/pitch/range, then the heading and the pitch angles are defined in the reference frame defined by the transformation matrix.
|
|
27520
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27521
|
+
angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center.
|
|
27522
|
+
|
|
27523
|
+
In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
27524
|
+
target will be the magnitude of the offset. The heading will be determined from the offset. If the heading cannot be
|
|
27525
|
+
determined from the offset, the heading will be north.
|
|
27501
27526
|
* @example
|
|
27502
27527
|
* // 1. Using a cartesian offset
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
27511
|
-
|
|
27528
|
+
const center = Cesium.Cartesian3.fromDegrees(-98.0, 40.0);
|
|
27529
|
+
viewer.camera.lookAt(center, new Cesium.Cartesian3(0.0, -4790000.0, 3930000.0));
|
|
27530
|
+
|
|
27531
|
+
// 2. Using a HeadingPitchRange offset
|
|
27532
|
+
const center = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
|
|
27533
|
+
const heading = Cesium.Math.toRadians(50.0);
|
|
27534
|
+
const pitch = Cesium.Math.toRadians(-20.0);
|
|
27535
|
+
const range = 5000.0;
|
|
27536
|
+
viewer.camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, range));
|
|
27512
27537
|
* @param target - The target position in world coordinates.
|
|
27513
27538
|
* @param offset - The offset from the target in the local east-north-up reference frame centered at the target.
|
|
27514
27539
|
*/
|
|
27515
27540
|
lookAt(target: Cartesian3, offset: Cartesian3 | HeadingPitchRange): void;
|
|
27516
27541
|
/**
|
|
27517
27542
|
* Sets the camera position and orientation using a target and transformation matrix. The offset can be either a cartesian or heading/pitch/range.
|
|
27518
|
-
|
|
27519
|
-
|
|
27520
|
-
|
|
27521
|
-
|
|
27522
|
-
|
|
27523
|
-
|
|
27524
|
-
|
|
27525
|
-
|
|
27543
|
+
If the offset is a cartesian, then it is an offset from the center of the reference frame defined by the transformation matrix. If the offset
|
|
27544
|
+
is heading/pitch/range, then the heading and the pitch angles are defined in the reference frame defined by the transformation matrix.
|
|
27545
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27546
|
+
angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center.
|
|
27547
|
+
|
|
27548
|
+
In 2D, there must be a top down view. The camera will be placed above the center of the reference frame. The height above the
|
|
27549
|
+
target will be the magnitude of the offset. The heading will be determined from the offset. If the heading cannot be
|
|
27550
|
+
determined from the offset, the heading will be north.
|
|
27526
27551
|
* @example
|
|
27527
27552
|
* // 1. Using a cartesian offset
|
|
27528
|
-
|
|
27529
|
-
|
|
27530
|
-
|
|
27531
|
-
|
|
27532
|
-
|
|
27533
|
-
|
|
27534
|
-
|
|
27535
|
-
|
|
27536
|
-
|
|
27553
|
+
const transform = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(-98.0, 40.0));
|
|
27554
|
+
viewer.camera.lookAtTransform(transform, new Cesium.Cartesian3(0.0, -4790000.0, 3930000.0));
|
|
27555
|
+
|
|
27556
|
+
// 2. Using a HeadingPitchRange offset
|
|
27557
|
+
const transform = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(-72.0, 40.0));
|
|
27558
|
+
const heading = Cesium.Math.toRadians(50.0);
|
|
27559
|
+
const pitch = Cesium.Math.toRadians(-20.0);
|
|
27560
|
+
const range = 5000.0;
|
|
27561
|
+
viewer.camera.lookAtTransform(transform, new Cesium.HeadingPitchRange(heading, pitch, range));
|
|
27537
27562
|
* @param transform - The transformation matrix defining the reference frame.
|
|
27538
27563
|
* @param [offset] - The offset from the target in a reference frame centered at the target.
|
|
27539
27564
|
*/
|
|
@@ -27549,20 +27574,20 @@ export class Camera {
|
|
|
27549
27574
|
* Pick an ellipsoid or map.
|
|
27550
27575
|
* @example
|
|
27551
27576
|
* const canvas = viewer.scene.canvas;
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27577
|
+
const center = new Cesium.Cartesian2(canvas.clientWidth / 2.0, canvas.clientHeight / 2.0);
|
|
27578
|
+
const ellipsoid = viewer.scene.ellipsoid;
|
|
27579
|
+
const result = viewer.camera.pickEllipsoid(center, ellipsoid);
|
|
27555
27580
|
* @param windowPosition - The x and y coordinates of a pixel.
|
|
27556
27581
|
* @param [ellipsoid = Ellipsoid.default] - The ellipsoid to pick.
|
|
27557
27582
|
* @param [result] - The object onto which to store the result.
|
|
27558
27583
|
* @returns If the ellipsoid or map was picked,
|
|
27559
|
-
|
|
27560
|
-
|
|
27584
|
+
returns the point on the surface of the ellipsoid or map in world
|
|
27585
|
+
coordinates. If the ellipsoid or map was not picked, returns undefined.
|
|
27561
27586
|
*/
|
|
27562
27587
|
pickEllipsoid(windowPosition: Cartesian2, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3 | undefined;
|
|
27563
27588
|
/**
|
|
27564
27589
|
* Create a ray from the camera position through the pixel at <code>windowPosition</code>
|
|
27565
|
-
|
|
27590
|
+
in world coordinates.
|
|
27566
27591
|
* @param windowPosition - The x and y coordinates of a pixel.
|
|
27567
27592
|
* @param [result] - The object onto which to store the result.
|
|
27568
27593
|
* @returns Returns the {@link Cartesian3} position and direction of the ray, or undefined if the pick ray cannot be determined.
|
|
@@ -27584,50 +27609,50 @@ export class Camera {
|
|
|
27584
27609
|
getPixelSize(boundingSphere: BoundingSphere, drawingBufferWidth: number, drawingBufferHeight: number): number;
|
|
27585
27610
|
/**
|
|
27586
27611
|
* Cancels the current camera flight and leaves the camera at its current location.
|
|
27587
|
-
|
|
27612
|
+
If no flight is in progress, this function does nothing.
|
|
27588
27613
|
*/
|
|
27589
27614
|
cancelFlight(): void;
|
|
27590
27615
|
/**
|
|
27591
27616
|
* Completes the current camera flight and moves the camera immediately to its final destination.
|
|
27592
|
-
|
|
27617
|
+
If no flight is in progress, this function does nothing.
|
|
27593
27618
|
*/
|
|
27594
27619
|
completeFlight(): void;
|
|
27595
27620
|
/**
|
|
27596
27621
|
* Flies the camera from its current position to a new position.
|
|
27597
27622
|
* @example
|
|
27598
27623
|
* // 1. Fly to a position with a top-down view
|
|
27599
|
-
|
|
27600
|
-
|
|
27601
|
-
|
|
27602
|
-
|
|
27603
|
-
|
|
27604
|
-
|
|
27605
|
-
|
|
27606
|
-
|
|
27607
|
-
|
|
27608
|
-
|
|
27609
|
-
|
|
27610
|
-
|
|
27611
|
-
|
|
27612
|
-
|
|
27613
|
-
|
|
27614
|
-
|
|
27615
|
-
|
|
27616
|
-
|
|
27617
|
-
|
|
27618
|
-
|
|
27619
|
-
|
|
27620
|
-
|
|
27621
|
-
|
|
27622
|
-
|
|
27623
|
-
|
|
27624
|
-
|
|
27625
|
-
|
|
27624
|
+
viewer.camera.flyTo({
|
|
27625
|
+
destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
|
|
27626
|
+
});
|
|
27627
|
+
|
|
27628
|
+
// 2. Fly to a Rectangle with a top-down view
|
|
27629
|
+
viewer.camera.flyTo({
|
|
27630
|
+
destination : Cesium.Rectangle.fromDegrees(west, south, east, north)
|
|
27631
|
+
});
|
|
27632
|
+
|
|
27633
|
+
// 3. Fly to a position with an orientation using unit vectors.
|
|
27634
|
+
viewer.camera.flyTo({
|
|
27635
|
+
destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27636
|
+
orientation : {
|
|
27637
|
+
direction : new Cesium.Cartesian3(-0.04231243104240401, -0.20123236049443421, -0.97862924300734),
|
|
27638
|
+
up : new Cesium.Cartesian3(-0.47934589305293746, -0.8553216253114552, 0.1966022179118339)
|
|
27639
|
+
}
|
|
27640
|
+
});
|
|
27641
|
+
|
|
27642
|
+
// 4. Fly to a position with an orientation using heading, pitch and roll.
|
|
27643
|
+
viewer.camera.flyTo({
|
|
27644
|
+
destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27645
|
+
orientation : {
|
|
27646
|
+
heading : Cesium.Math.toRadians(175.0),
|
|
27647
|
+
pitch : Cesium.Math.toRadians(-35.0),
|
|
27648
|
+
roll : 0.0
|
|
27649
|
+
}
|
|
27650
|
+
});
|
|
27626
27651
|
* @param options - Object with the following properties:
|
|
27627
27652
|
* @param options.destination - The final position of the camera in world coordinates or a rectangle that would be visible from a top-down view.
|
|
27628
27653
|
* @param [options.orientation] - An object that contains either direction and up properties or heading, pitch and roll properties. By default, the direction will point
|
|
27629
|
-
|
|
27630
|
-
|
|
27654
|
+
towards the center of the frame in 3D and in the negative z direction in Columbus view. The up direction will point towards local north in 3D and in the positive
|
|
27655
|
+
y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
|
|
27631
27656
|
* @param [options.duration] - The duration of the flight in seconds. If omitted, Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight.
|
|
27632
27657
|
* @param [options.complete] - The function to execute when the flight is complete.
|
|
27633
27658
|
* @param [options.cancel] - The function to execute if the flight is cancelled.
|
|
@@ -27655,31 +27680,31 @@ export class Camera {
|
|
|
27655
27680
|
}): void;
|
|
27656
27681
|
/**
|
|
27657
27682
|
* Sets the camera so that the current view contains the provided bounding sphere.
|
|
27658
|
-
|
|
27659
|
-
|
|
27660
|
-
|
|
27661
|
-
|
|
27662
|
-
|
|
27663
|
-
|
|
27664
|
-
|
|
27665
|
-
|
|
27666
|
-
|
|
27667
|
-
|
|
27683
|
+
|
|
27684
|
+
<p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
27685
|
+
The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
27686
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27687
|
+
angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center. If the range is
|
|
27688
|
+
zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
27689
|
+
|
|
27690
|
+
<p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
27691
|
+
target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
27692
|
+
determined from the offset, the heading will be north.</p>
|
|
27668
27693
|
* @param boundingSphere - The bounding sphere to view, in world coordinates.
|
|
27669
27694
|
* @param [offset] - The offset from the target in the local east-north-up reference frame centered at the target.
|
|
27670
27695
|
*/
|
|
27671
27696
|
viewBoundingSphere(boundingSphere: BoundingSphere, offset?: HeadingPitchRange): void;
|
|
27672
27697
|
/**
|
|
27673
27698
|
* Flies the camera to a location where the current view contains the provided bounding sphere.
|
|
27674
|
-
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
|
|
27678
|
-
|
|
27679
|
-
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27699
|
+
|
|
27700
|
+
<p> The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
27701
|
+
The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
27702
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27703
|
+
angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center. If the range is
|
|
27704
|
+
zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
27705
|
+
|
|
27706
|
+
<p>In 2D and Columbus View, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
27707
|
+
target will be the range. The heading will be aligned to local north.</p>
|
|
27683
27708
|
* @param boundingSphere - The bounding sphere to view, in world coordinates.
|
|
27684
27709
|
* @param [options] - Object with the following properties:
|
|
27685
27710
|
* @param [options.duration] - The duration of the flight in seconds. If omitted, Cesium attempts to calculate an ideal duration based on the distance to be traveled by the flight.
|
|
@@ -27714,14 +27739,14 @@ export class Camera {
|
|
|
27714
27739
|
computeViewRectangle(ellipsoid?: Ellipsoid, result?: Rectangle): Rectangle | undefined;
|
|
27715
27740
|
/**
|
|
27716
27741
|
* Switches the frustum/projection to perspective.
|
|
27717
|
-
|
|
27718
|
-
|
|
27742
|
+
|
|
27743
|
+
This function is a no-op in 2D which must always be orthographic.
|
|
27719
27744
|
*/
|
|
27720
27745
|
switchToPerspectiveFrustum(): void;
|
|
27721
27746
|
/**
|
|
27722
27747
|
* Switches the frustum/projection to orthographic.
|
|
27723
|
-
|
|
27724
|
-
|
|
27748
|
+
|
|
27749
|
+
This function is a no-op in 2D which will always be orthographic.
|
|
27725
27750
|
*/
|
|
27726
27751
|
switchToOrthographicFrustum(): void;
|
|
27727
27752
|
}
|
|
@@ -30114,6 +30139,44 @@ export class Cesium3DTileStyle {
|
|
|
30114
30139
|
meta: StyleExpression;
|
|
30115
30140
|
}
|
|
30116
30141
|
|
|
30142
|
+
export namespace Cesium3DTilesVoxelProvider {
|
|
30143
|
+
/**
|
|
30144
|
+
* Initialization options for the Cesium3DTilesVoxelProvider constructor
|
|
30145
|
+
* @property className - The class in the tileset schema describing voxel metadata.
|
|
30146
|
+
* @property names - The metadata names.
|
|
30147
|
+
* @property types - The metadata types.
|
|
30148
|
+
* @property componentTypes - The metadata component types.
|
|
30149
|
+
* @property shape - The {@link VoxelShapeType}.
|
|
30150
|
+
* @property dimensions - The number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
30151
|
+
* @property [paddingBefore = Cartesian3.ZERO] - The number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30152
|
+
* @property [paddingAfter = Cartesian3.ZERO] - The number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30153
|
+
* @property [globalTransform = Matrix4.IDENTITY] - A transform from local space to global space.
|
|
30154
|
+
* @property [shapeTransform = Matrix4.IDENTITY] - A transform from shape space to local space.
|
|
30155
|
+
* @property [minBounds] - The minimum bounds.
|
|
30156
|
+
* @property [maxBounds] - The maximum bounds.
|
|
30157
|
+
* @property [minimumValues] - The metadata minimum values.
|
|
30158
|
+
* @property [maximumValues] - The metadata maximum values.
|
|
30159
|
+
* @property [maximumTileCount] - The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
|
|
30160
|
+
*/
|
|
30161
|
+
type ConstructorOptions = {
|
|
30162
|
+
className: string;
|
|
30163
|
+
names: string[];
|
|
30164
|
+
types: MetadataType[];
|
|
30165
|
+
componentTypes: MetadataComponentType[];
|
|
30166
|
+
shape: VoxelShapeType;
|
|
30167
|
+
dimensions: Cartesian3;
|
|
30168
|
+
paddingBefore?: Cartesian3;
|
|
30169
|
+
paddingAfter?: Cartesian3;
|
|
30170
|
+
globalTransform?: Matrix4;
|
|
30171
|
+
shapeTransform?: Matrix4;
|
|
30172
|
+
minBounds?: Cartesian3;
|
|
30173
|
+
maxBounds?: Cartesian3;
|
|
30174
|
+
minimumValues?: number[][];
|
|
30175
|
+
maximumValues?: number[][];
|
|
30176
|
+
maximumTileCount?: number;
|
|
30177
|
+
};
|
|
30178
|
+
}
|
|
30179
|
+
|
|
30117
30180
|
/**
|
|
30118
30181
|
* A {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
30119
30182
|
<p>
|
|
@@ -30122,102 +30185,112 @@ Implements the {@link VoxelProvider} interface.
|
|
|
30122
30185
|
<div class="notice">
|
|
30123
30186
|
This object is normally not instantiated directly, use {@link Cesium3DTilesVoxelProvider.fromUrl}.
|
|
30124
30187
|
</div>
|
|
30125
|
-
* @param options -
|
|
30188
|
+
* @param options - An object describing initialization options
|
|
30126
30189
|
*/
|
|
30127
30190
|
export class Cesium3DTilesVoxelProvider extends VoxelProvider {
|
|
30128
|
-
constructor(options:
|
|
30129
|
-
/**
|
|
30130
|
-
* Creates a {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
30131
|
-
* @param url - The URL to a tileset JSON file
|
|
30132
|
-
* @returns The created provider
|
|
30133
|
-
*/
|
|
30134
|
-
static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
|
|
30191
|
+
constructor(options: Cesium3DTilesVoxelProvider.ConstructorOptions);
|
|
30135
30192
|
/**
|
|
30136
|
-
* A transform from local space to global space.
|
|
30193
|
+
* A transform from local space to global space.
|
|
30137
30194
|
*/
|
|
30138
|
-
readonly globalTransform: Matrix4
|
|
30195
|
+
readonly globalTransform: Matrix4;
|
|
30139
30196
|
/**
|
|
30140
|
-
* A transform from shape space to local space.
|
|
30197
|
+
* A transform from shape space to local space.
|
|
30141
30198
|
*/
|
|
30142
|
-
readonly shapeTransform: Matrix4
|
|
30199
|
+
readonly shapeTransform: Matrix4;
|
|
30143
30200
|
/**
|
|
30144
30201
|
* Gets the {@link VoxelShapeType}
|
|
30145
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30146
30202
|
*/
|
|
30147
30203
|
readonly shape: VoxelShapeType;
|
|
30148
30204
|
/**
|
|
30149
30205
|
* Gets the minimum bounds.
|
|
30150
30206
|
If undefined, the shape's default minimum bounds will be used instead.
|
|
30151
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30152
30207
|
*/
|
|
30153
30208
|
readonly minBounds: Cartesian3 | undefined;
|
|
30154
30209
|
/**
|
|
30155
30210
|
* Gets the maximum bounds.
|
|
30156
30211
|
If undefined, the shape's default maximum bounds will be used instead.
|
|
30157
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30158
30212
|
*/
|
|
30159
30213
|
readonly maxBounds: Cartesian3 | undefined;
|
|
30160
30214
|
/**
|
|
30161
30215
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
30162
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30163
30216
|
*/
|
|
30164
30217
|
readonly dimensions: Cartesian3;
|
|
30165
30218
|
/**
|
|
30166
30219
|
* Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30167
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30168
30220
|
*/
|
|
30169
|
-
readonly paddingBefore: Cartesian3
|
|
30221
|
+
readonly paddingBefore: Cartesian3;
|
|
30170
30222
|
/**
|
|
30171
30223
|
* Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30172
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30173
30224
|
*/
|
|
30174
|
-
readonly paddingAfter: Cartesian3
|
|
30225
|
+
readonly paddingAfter: Cartesian3;
|
|
30226
|
+
/**
|
|
30227
|
+
* The metadata class for this tileset.
|
|
30228
|
+
*/
|
|
30229
|
+
readonly className: string;
|
|
30175
30230
|
/**
|
|
30176
30231
|
* Gets the metadata names.
|
|
30177
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30178
30232
|
*/
|
|
30179
30233
|
readonly names: string[];
|
|
30180
30234
|
/**
|
|
30181
30235
|
* Gets the metadata types.
|
|
30182
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30183
30236
|
*/
|
|
30184
30237
|
readonly types: MetadataType[];
|
|
30185
30238
|
/**
|
|
30186
30239
|
* Gets the metadata component types.
|
|
30187
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30188
30240
|
*/
|
|
30189
30241
|
readonly componentTypes: MetadataComponentType[];
|
|
30190
30242
|
/**
|
|
30191
30243
|
* Gets the metadata minimum values.
|
|
30192
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30193
30244
|
*/
|
|
30194
30245
|
readonly minimumValues: number[][] | undefined;
|
|
30195
30246
|
/**
|
|
30196
30247
|
* Gets the metadata maximum values.
|
|
30197
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30198
30248
|
*/
|
|
30199
30249
|
readonly maximumValues: number[][] | undefined;
|
|
30200
30250
|
/**
|
|
30201
|
-
* The maximum number of tiles that exist for this provider.
|
|
30202
|
-
This
|
|
30251
|
+
* The maximum number of tiles that exist for this provider.
|
|
30252
|
+
This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
|
|
30253
|
+
If this value is not known it can be undefined.
|
|
30203
30254
|
*/
|
|
30204
30255
|
readonly maximumTileCount: number | undefined;
|
|
30205
30256
|
/**
|
|
30206
|
-
*
|
|
30207
|
-
|
|
30257
|
+
* The number of levels of detail containing available tiles in the tileset.
|
|
30258
|
+
*/
|
|
30259
|
+
readonly availableLevels: number | undefined;
|
|
30260
|
+
/**
|
|
30261
|
+
* Creates a {@link Cesium3DTilesVoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
30262
|
+
* @example
|
|
30263
|
+
* try {
|
|
30264
|
+
const voxelProvider = await Cesium3DTilesVoxelProvider.fromUrl(
|
|
30265
|
+
"http://localhost:8002/tilesets/voxel/tileset.json"
|
|
30266
|
+
);
|
|
30267
|
+
const voxelPrimitive = new VoxelPrimitive({
|
|
30268
|
+
provider: voxelProvider,
|
|
30269
|
+
customShader: customShader,
|
|
30270
|
+
});
|
|
30271
|
+
scene.primitives.add(voxelPrimitive);
|
|
30272
|
+
} catch (error) {
|
|
30273
|
+
console.error(`Error creating voxel primitive: ${error}`);
|
|
30274
|
+
}
|
|
30275
|
+
* @param url - The URL to a tileset JSON file
|
|
30276
|
+
* @returns The created provider
|
|
30277
|
+
*/
|
|
30278
|
+
static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
|
|
30279
|
+
/**
|
|
30280
|
+
* Requests the data for a given tile.
|
|
30208
30281
|
* @param [options] - Object with the following properties:
|
|
30209
30282
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
30210
30283
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
30211
30284
|
* @param [options.tileY = 0] - The tile's Y coordinate.
|
|
30212
30285
|
* @param [options.tileZ = 0] - The tile's Z coordinate.
|
|
30213
|
-
* @returns A promise to
|
|
30286
|
+
* @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
|
|
30214
30287
|
*/
|
|
30215
30288
|
requestData(options?: {
|
|
30216
30289
|
tileLevel?: number;
|
|
30217
30290
|
tileX?: number;
|
|
30218
30291
|
tileY?: number;
|
|
30219
30292
|
tileZ?: number;
|
|
30220
|
-
}): Promise<
|
|
30293
|
+
}): Promise<VoxelContent> | undefined;
|
|
30221
30294
|
}
|
|
30222
30295
|
|
|
30223
30296
|
/**
|
|
@@ -32179,19 +32252,19 @@ export class EllipsoidSurfaceAppearance {
|
|
|
32179
32252
|
|
|
32180
32253
|
/**
|
|
32181
32254
|
* An expression for a style applied to a {@link Cesium3DTileset}.
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
|
|
32255
|
+
<p>
|
|
32256
|
+
Evaluates an expression defined using the
|
|
32257
|
+
{@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}.
|
|
32258
|
+
</p>
|
|
32259
|
+
<p>
|
|
32260
|
+
Implements the {@link StyleExpression} interface.
|
|
32261
|
+
</p>
|
|
32189
32262
|
* @example
|
|
32190
32263
|
* const expression = new Cesium.Expression('(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)');
|
|
32191
|
-
|
|
32264
|
+
expression.evaluate(feature); // returns true or false depending on the feature's properties
|
|
32192
32265
|
* @example
|
|
32193
32266
|
* const expression = new Cesium.Expression('(${Temperature} > 90) ? color("red") : color("white")');
|
|
32194
|
-
|
|
32267
|
+
expression.evaluateColor(feature, result); // returns a Cesium.Color object
|
|
32195
32268
|
* @param [expression] - The expression defined using the 3D Tiles Styling language.
|
|
32196
32269
|
* @param [defines] - Defines in the style.
|
|
32197
32270
|
*/
|
|
@@ -32203,13 +32276,13 @@ export class Expression {
|
|
|
32203
32276
|
readonly expression: string;
|
|
32204
32277
|
/**
|
|
32205
32278
|
* Evaluates the result of an expression, optionally using the provided feature's properties. If the result of
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32279
|
+
the expression in the
|
|
32280
|
+
{@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}
|
|
32281
|
+
is of type <code>Boolean</code>, <code>Number</code>, or <code>String</code>, the corresponding JavaScript
|
|
32282
|
+
primitive type will be returned. If the result is a <code>RegExp</code>, a Javascript <code>RegExp</code>
|
|
32283
|
+
object will be returned. If the result is a <code>Cartesian2</code>, <code>Cartesian3</code>, or <code>Cartesian4</code>,
|
|
32284
|
+
a {@link Cartesian2}, {@link Cartesian3}, or {@link Cartesian4} object will be returned. If the <code>result</code> argument is
|
|
32285
|
+
a {@link Color}, the {@link Cartesian4} value is converted to a {@link Color} and then returned.
|
|
32213
32286
|
* @param feature - The feature whose properties may be used as variables in the expression.
|
|
32214
32287
|
* @param [result] - The object onto which to store the result.
|
|
32215
32288
|
* @returns The result of evaluating the expression.
|
|
@@ -32217,9 +32290,9 @@ export class Expression {
|
|
|
32217
32290
|
evaluate(feature: Cesium3DTileFeature, result?: any): boolean | number | string | RegExp | Cartesian2 | Cartesian3 | Cartesian4 | Color;
|
|
32218
32291
|
/**
|
|
32219
32292
|
* Evaluates the result of a Color expression, optionally using the provided feature's properties.
|
|
32220
|
-
|
|
32221
|
-
|
|
32222
|
-
|
|
32293
|
+
<p>
|
|
32294
|
+
This is equivalent to {@link Expression#evaluate} but always returns a {@link Color} object.
|
|
32295
|
+
</p>
|
|
32223
32296
|
* @param feature - The feature whose properties may be used as variables in the expression.
|
|
32224
32297
|
* @param [result] - The object in which to store the result
|
|
32225
32298
|
* @returns The modified result parameter or a new Color instance if one was not provided.
|
|
@@ -34644,24 +34717,24 @@ export class ImageryLayerCollection {
|
|
|
34644
34717
|
constructor();
|
|
34645
34718
|
/**
|
|
34646
34719
|
* An event that is raised when a layer is added to the collection. Event handlers are passed the layer that
|
|
34647
|
-
|
|
34720
|
+
was added and the index at which it was added.
|
|
34648
34721
|
*/
|
|
34649
34722
|
layerAdded: Event;
|
|
34650
34723
|
/**
|
|
34651
34724
|
* An event that is raised when a layer is removed from the collection. Event handlers are passed the layer that
|
|
34652
|
-
|
|
34725
|
+
was removed and the index from which it was removed.
|
|
34653
34726
|
*/
|
|
34654
34727
|
layerRemoved: Event;
|
|
34655
34728
|
/**
|
|
34656
34729
|
* An event that is raised when a layer changes position in the collection. Event handlers are passed the layer that
|
|
34657
|
-
|
|
34730
|
+
was moved, its new index after the move, and its old index prior to the move.
|
|
34658
34731
|
*/
|
|
34659
34732
|
layerMoved: Event;
|
|
34660
34733
|
/**
|
|
34661
34734
|
* An event that is raised when a layer is shown or hidden by setting the
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34735
|
+
{@link ImageryLayer#show} property. Event handlers are passed a reference to this layer,
|
|
34736
|
+
the index of the layer in the collection, and a flag that is true if the layer is now
|
|
34737
|
+
shown or false if it is now hidden.
|
|
34665
34738
|
*/
|
|
34666
34739
|
layerShownOrHidden: Event;
|
|
34667
34740
|
/**
|
|
@@ -34672,27 +34745,27 @@ export class ImageryLayerCollection {
|
|
|
34672
34745
|
* Adds a layer to the collection.
|
|
34673
34746
|
* @example
|
|
34674
34747
|
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
|
|
34675
|
-
|
|
34748
|
+
scene.imageryLayers.add(imageryLayer);
|
|
34676
34749
|
* @example
|
|
34677
34750
|
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
|
|
34678
|
-
|
|
34751
|
+
scene.imageryLayers.add(imageryLayer);
|
|
34679
34752
|
* @param layer - the layer to add.
|
|
34680
34753
|
* @param [index] - the index to add the layer at. If omitted, the layer will
|
|
34681
|
-
|
|
34754
|
+
be added on top of all existing layers.
|
|
34682
34755
|
*/
|
|
34683
34756
|
add(layer: ImageryLayer, index?: number): void;
|
|
34684
34757
|
/**
|
|
34685
34758
|
* Creates a new layer using the given ImageryProvider and adds it to the collection.
|
|
34686
34759
|
* @example
|
|
34687
34760
|
* try {
|
|
34688
|
-
|
|
34689
|
-
|
|
34690
|
-
|
|
34691
|
-
|
|
34692
|
-
|
|
34761
|
+
const provider = await Cesium.IonImageryProvider.fromAssetId(3812);
|
|
34762
|
+
scene.imageryLayers.addImageryProvider(provider);
|
|
34763
|
+
} catch (error) {
|
|
34764
|
+
console.log(`There was an error creating the imagery layer. ${error}`)
|
|
34765
|
+
}
|
|
34693
34766
|
* @param imageryProvider - the imagery provider to create a new layer for.
|
|
34694
34767
|
* @param [index] - the index to add the layer at. If omitted, the layer will
|
|
34695
|
-
|
|
34768
|
+
added on top of all existing layers.
|
|
34696
34769
|
* @returns The newly created layer.
|
|
34697
34770
|
*/
|
|
34698
34771
|
addImageryProvider(imageryProvider: ImageryProvider, index?: number): ImageryLayer;
|
|
@@ -34701,7 +34774,7 @@ export class ImageryLayerCollection {
|
|
|
34701
34774
|
* @param layer - The layer to remove.
|
|
34702
34775
|
* @param [destroy = true] - whether to destroy the layers in addition to removing them.
|
|
34703
34776
|
* @returns true if the layer was in the collection and was removed,
|
|
34704
|
-
|
|
34777
|
+
false if the layer was not in the collection.
|
|
34705
34778
|
*/
|
|
34706
34779
|
remove(layer: ImageryLayer, destroy?: boolean): boolean;
|
|
34707
34780
|
/**
|
|
@@ -34749,57 +34822,57 @@ export class ImageryLayerCollection {
|
|
|
34749
34822
|
lowerToBottom(layer: ImageryLayer): void;
|
|
34750
34823
|
/**
|
|
34751
34824
|
* Determines the imagery layers that are intersected by a pick ray. To compute a pick ray from a
|
|
34752
|
-
|
|
34825
|
+
location on the screen, use {@link Camera.getPickRay}.
|
|
34753
34826
|
* @param ray - The ray to test for intersection.
|
|
34754
34827
|
* @param scene - The scene.
|
|
34755
34828
|
* @returns An array that includes all of
|
|
34756
|
-
|
|
34757
|
-
|
|
34829
|
+
the layers that are intersected by a given pick ray. Undefined if
|
|
34830
|
+
no layers are selected.
|
|
34758
34831
|
*/
|
|
34759
34832
|
pickImageryLayers(ray: Ray, scene: Scene): ImageryLayer[] | undefined;
|
|
34760
34833
|
/**
|
|
34761
34834
|
* Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery
|
|
34762
|
-
|
|
34763
|
-
|
|
34835
|
+
layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
|
|
34836
|
+
by the pick ray. To compute a pick ray from a location on the screen, use {@link Camera.getPickRay}.
|
|
34764
34837
|
* @example
|
|
34765
34838
|
* const pickRay = viewer.camera.getPickRay(windowPosition);
|
|
34766
|
-
|
|
34767
|
-
|
|
34768
|
-
|
|
34769
|
-
|
|
34770
|
-
|
|
34771
|
-
|
|
34772
|
-
|
|
34773
|
-
|
|
34774
|
-
|
|
34775
|
-
|
|
34776
|
-
|
|
34777
|
-
|
|
34839
|
+
const featuresPromise = viewer.imageryLayers.pickImageryLayerFeatures(pickRay, viewer.scene);
|
|
34840
|
+
if (!Cesium.defined(featuresPromise)) {
|
|
34841
|
+
console.log('No features picked.');
|
|
34842
|
+
} else {
|
|
34843
|
+
Promise.resolve(featuresPromise).then(function(features) {
|
|
34844
|
+
// This function is called asynchronously when the list if picked features is available.
|
|
34845
|
+
console.log(`Number of features: ${features.length}`);
|
|
34846
|
+
if (features.length > 0) {
|
|
34847
|
+
console.log(`First feature name: ${features[0].name}`);
|
|
34848
|
+
}
|
|
34849
|
+
});
|
|
34850
|
+
}
|
|
34778
34851
|
* @param ray - The ray to test for intersection.
|
|
34779
34852
|
* @param scene - The scene.
|
|
34780
34853
|
* @returns A promise that resolves to an array of features intersected by the pick ray.
|
|
34781
|
-
|
|
34782
|
-
|
|
34783
|
-
|
|
34784
|
-
|
|
34854
|
+
If it can be quickly determined that no features are intersected (for example,
|
|
34855
|
+
because no active imagery providers support {@link ImageryProvider#pickFeatures}
|
|
34856
|
+
or because the pick ray does not intersect the surface), this function will
|
|
34857
|
+
return undefined.
|
|
34785
34858
|
*/
|
|
34786
34859
|
pickImageryLayerFeatures(ray: Ray, scene: Scene): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
34787
34860
|
/**
|
|
34788
34861
|
* Returns true if this object was destroyed; otherwise, false.
|
|
34789
|
-
|
|
34790
|
-
|
|
34791
|
-
|
|
34862
|
+
<br /><br />
|
|
34863
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
34864
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
34792
34865
|
* @returns true if this object was destroyed; otherwise, false.
|
|
34793
34866
|
*/
|
|
34794
34867
|
isDestroyed(): boolean;
|
|
34795
34868
|
/**
|
|
34796
34869
|
* Destroys the WebGL resources held by all layers in this collection. Explicitly destroying this
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
|
|
34802
|
-
|
|
34870
|
+
object allows for deterministic release of WebGL resources, instead of relying on the garbage
|
|
34871
|
+
collector.
|
|
34872
|
+
<br /><br />
|
|
34873
|
+
Once this object is destroyed, it should not be used; calling any function other than
|
|
34874
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
34875
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
34803
34876
|
* @example
|
|
34804
34877
|
* layerCollection = layerCollection && layerCollection.destroy();
|
|
34805
34878
|
*/
|
|
@@ -35571,7 +35644,7 @@ export class LabelCollection {
|
|
|
35571
35644
|
{@link LabelCollection#get} to iterate over all the labels
|
|
35572
35645
|
in the collection.
|
|
35573
35646
|
*/
|
|
35574
|
-
length: number;
|
|
35647
|
+
readonly length: number;
|
|
35575
35648
|
/**
|
|
35576
35649
|
* Creates and adds a label with the specified initial properties to the collection.
|
|
35577
35650
|
The added label is returned so it can be modified or removed from the collection later.
|
|
@@ -35995,216 +36068,216 @@ export enum MapMode2D {
|
|
|
35995
36068
|
|
|
35996
36069
|
/**
|
|
35997
36070
|
* A Material defines surface appearance through a combination of diffuse, specular,
|
|
35998
|
-
|
|
35999
|
-
|
|
36000
|
-
|
|
36001
|
-
|
|
36002
|
-
|
|
36003
|
-
|
|
36004
|
-
|
|
36005
|
-
|
|
36006
|
-
|
|
36007
|
-
|
|
36008
|
-
|
|
36009
|
-
|
|
36010
|
-
|
|
36011
|
-
|
|
36012
|
-
|
|
36013
|
-
|
|
36014
|
-
|
|
36015
|
-
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
|
|
36019
|
-
|
|
36020
|
-
|
|
36021
|
-
|
|
36022
|
-
|
|
36023
|
-
|
|
36024
|
-
|
|
36025
|
-
|
|
36026
|
-
|
|
36027
|
-
|
|
36028
|
-
|
|
36029
|
-
|
|
36030
|
-
|
|
36031
|
-
|
|
36032
|
-
|
|
36033
|
-
|
|
36034
|
-
|
|
36035
|
-
|
|
36036
|
-
|
|
36037
|
-
|
|
36038
|
-
|
|
36039
|
-
|
|
36040
|
-
|
|
36041
|
-
|
|
36042
|
-
|
|
36043
|
-
|
|
36044
|
-
|
|
36045
|
-
|
|
36046
|
-
|
|
36047
|
-
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
|
|
36051
|
-
|
|
36052
|
-
|
|
36053
|
-
|
|
36054
|
-
|
|
36055
|
-
|
|
36056
|
-
|
|
36057
|
-
|
|
36058
|
-
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
|
|
36063
|
-
|
|
36064
|
-
|
|
36065
|
-
|
|
36066
|
-
|
|
36067
|
-
|
|
36068
|
-
|
|
36069
|
-
|
|
36070
|
-
|
|
36071
|
-
|
|
36072
|
-
|
|
36073
|
-
|
|
36074
|
-
|
|
36075
|
-
|
|
36076
|
-
|
|
36077
|
-
|
|
36078
|
-
|
|
36079
|
-
|
|
36080
|
-
|
|
36081
|
-
|
|
36082
|
-
|
|
36083
|
-
|
|
36084
|
-
|
|
36085
|
-
|
|
36086
|
-
|
|
36087
|
-
|
|
36088
|
-
|
|
36089
|
-
|
|
36090
|
-
|
|
36091
|
-
|
|
36092
|
-
|
|
36093
|
-
|
|
36094
|
-
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36098
|
-
|
|
36099
|
-
|
|
36100
|
-
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
|
|
36104
|
-
|
|
36105
|
-
|
|
36106
|
-
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
|
|
36122
|
-
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
|
|
36135
|
-
|
|
36136
|
-
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
|
|
36147
|
-
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
|
|
36152
|
-
|
|
36153
|
-
|
|
36154
|
-
|
|
36155
|
-
|
|
36156
|
-
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
|
|
36167
|
-
|
|
36168
|
-
|
|
36169
|
-
|
|
36170
|
-
|
|
36171
|
-
|
|
36172
|
-
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
|
|
36177
|
-
|
|
36178
|
-
|
|
36179
|
-
|
|
36180
|
-
|
|
36181
|
-
|
|
36182
|
-
|
|
36183
|
-
|
|
36184
|
-
|
|
36185
|
-
|
|
36186
|
-
|
|
36071
|
+
normal, emission, and alpha components. These values are specified using a
|
|
36072
|
+
JSON schema called Fabric which gets parsed and assembled into glsl shader code
|
|
36073
|
+
behind-the-scenes. Check out the {@link https://github.com/CesiumGS/cesium/wiki/Fabric|wiki page}
|
|
36074
|
+
for more details on Fabric.
|
|
36075
|
+
<br /><br />
|
|
36076
|
+
<style type="text/css">
|
|
36077
|
+
#materialDescriptions code {
|
|
36078
|
+
font-weight: normal;
|
|
36079
|
+
font-family: Consolas, 'Lucida Console', Monaco, monospace;
|
|
36080
|
+
color: #A35A00;
|
|
36081
|
+
}
|
|
36082
|
+
#materialDescriptions ul, #materialDescriptions ul ul {
|
|
36083
|
+
list-style-type: none;
|
|
36084
|
+
}
|
|
36085
|
+
#materialDescriptions ul ul {
|
|
36086
|
+
margin-bottom: 10px;
|
|
36087
|
+
}
|
|
36088
|
+
#materialDescriptions ul ul li {
|
|
36089
|
+
font-weight: normal;
|
|
36090
|
+
color: #000000;
|
|
36091
|
+
text-indent: -2em;
|
|
36092
|
+
margin-left: 2em;
|
|
36093
|
+
}
|
|
36094
|
+
#materialDescriptions ul li {
|
|
36095
|
+
font-weight: bold;
|
|
36096
|
+
color: #0053CF;
|
|
36097
|
+
}
|
|
36098
|
+
</style>
|
|
36099
|
+
|
|
36100
|
+
Base material types and their uniforms:
|
|
36101
|
+
<div id='materialDescriptions'>
|
|
36102
|
+
<ul>
|
|
36103
|
+
<li>Color</li>
|
|
36104
|
+
<ul>
|
|
36105
|
+
<li><code>color</code>: rgba color object.</li>
|
|
36106
|
+
</ul>
|
|
36107
|
+
<li>Image</li>
|
|
36108
|
+
<ul>
|
|
36109
|
+
<li><code>image</code>: path to image.</li>
|
|
36110
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36111
|
+
</ul>
|
|
36112
|
+
<li>DiffuseMap</li>
|
|
36113
|
+
<ul>
|
|
36114
|
+
<li><code>image</code>: path to image.</li>
|
|
36115
|
+
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.</li>
|
|
36116
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36117
|
+
</ul>
|
|
36118
|
+
<li>AlphaMap</li>
|
|
36119
|
+
<ul>
|
|
36120
|
+
<li><code>image</code>: path to image.</li>
|
|
36121
|
+
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36122
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36123
|
+
</ul>
|
|
36124
|
+
<li>SpecularMap</li>
|
|
36125
|
+
<ul>
|
|
36126
|
+
<li><code>image</code>: path to image.</li>
|
|
36127
|
+
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36128
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36129
|
+
</ul>
|
|
36130
|
+
<li>EmissionMap</li>
|
|
36131
|
+
<ul>
|
|
36132
|
+
<li><code>image</code>: path to image.</li>
|
|
36133
|
+
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
|
|
36134
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36135
|
+
</ul>
|
|
36136
|
+
<li>BumpMap</li>
|
|
36137
|
+
<ul>
|
|
36138
|
+
<li><code>image</code>: path to image.</li>
|
|
36139
|
+
<li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36140
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36141
|
+
<li><code>strength</code>: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.</li>
|
|
36142
|
+
</ul>
|
|
36143
|
+
<li>NormalMap</li>
|
|
36144
|
+
<ul>
|
|
36145
|
+
<li><code>image</code>: path to image.</li>
|
|
36146
|
+
<li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
|
|
36147
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36148
|
+
<li><code>strength</code>: Bump strength value between 0.0 and 1.0 where 0.0 is small bumps and 1.0 is large bumps.</li>
|
|
36149
|
+
</ul>
|
|
36150
|
+
<li>Grid</li>
|
|
36151
|
+
<ul>
|
|
36152
|
+
<li><code>color</code>: rgba color object for the whole material.</li>
|
|
36153
|
+
<li><code>cellAlpha</code>: Alpha value for the cells between grid lines. This will be combined with color.alpha.</li>
|
|
36154
|
+
<li><code>lineCount</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
|
|
36155
|
+
<li><code>lineThickness</code>: Object with x and y values specifying the thickness of grid lines (in pixels where available).</li>
|
|
36156
|
+
<li><code>lineOffset</code>: Object with x and y values specifying the offset of grid lines (range is 0 to 1).</li>
|
|
36157
|
+
</ul>
|
|
36158
|
+
<li>Stripe</li>
|
|
36159
|
+
<ul>
|
|
36160
|
+
<li><code>horizontal</code>: Boolean that determines if the stripes are horizontal or vertical.</li>
|
|
36161
|
+
<li><code>evenColor</code>: rgba color object for the stripe's first color.</li>
|
|
36162
|
+
<li><code>oddColor</code>: rgba color object for the stripe's second color.</li>
|
|
36163
|
+
<li><code>offset</code>: Number that controls at which point into the pattern to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning of the odd color, 2.0 being the even color again, and any multiple or fractional values being in between.</li>
|
|
36164
|
+
<li><code>repeat</code>: Number that controls the total number of stripes, half light and half dark.</li>
|
|
36165
|
+
</ul>
|
|
36166
|
+
<li>Checkerboard</li>
|
|
36167
|
+
<ul>
|
|
36168
|
+
<li><code>lightColor</code>: rgba color object for the checkerboard's light alternating color.</li>
|
|
36169
|
+
<li><code>darkColor</code>: rgba color object for the checkerboard's dark alternating color.</li>
|
|
36170
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
|
|
36171
|
+
</ul>
|
|
36172
|
+
<li>Dot</li>
|
|
36173
|
+
<ul>
|
|
36174
|
+
<li><code>lightColor</code>: rgba color object for the dot color.</li>
|
|
36175
|
+
<li><code>darkColor</code>: rgba color object for the background color.</li>
|
|
36176
|
+
<li><code>repeat</code>: Object with x and y values specifying the number of columns and rows of dots respectively.</li>
|
|
36177
|
+
</ul>
|
|
36178
|
+
<li>Water</li>
|
|
36179
|
+
<ul>
|
|
36180
|
+
<li><code>baseWaterColor</code>: rgba color object base color of the water.</li>
|
|
36181
|
+
<li><code>blendColor</code>: rgba color object used when blending from water to non-water areas.</li>
|
|
36182
|
+
<li><code>specularMap</code>: Single channel texture used to indicate areas of water.</li>
|
|
36183
|
+
<li><code>normalMap</code>: Normal map for water normal perturbation.</li>
|
|
36184
|
+
<li><code>frequency</code>: Number that controls the number of waves.</li>
|
|
36185
|
+
<li><code>animationSpeed</code>: Number that controls the animations speed of the water.</li>
|
|
36186
|
+
<li><code>amplitude</code>: Number that controls the amplitude of water waves.</li>
|
|
36187
|
+
<li><code>specularIntensity</code>: Number that controls the intensity of specular reflections.</li>
|
|
36188
|
+
</ul>
|
|
36189
|
+
<li>RimLighting</li>
|
|
36190
|
+
<ul>
|
|
36191
|
+
<li><code>color</code>: diffuse color and alpha.</li>
|
|
36192
|
+
<li><code>rimColor</code>: diffuse color and alpha of the rim.</li>
|
|
36193
|
+
<li><code>width</code>: Number that determines the rim's width.</li>
|
|
36194
|
+
</ul>
|
|
36195
|
+
<li>Fade</li>
|
|
36196
|
+
<ul>
|
|
36197
|
+
<li><code>fadeInColor</code>: diffuse color and alpha at <code>time</code></li>
|
|
36198
|
+
<li><code>fadeOutColor</code>: diffuse color and alpha at <code>maximumDistance</code> from <code>time</code></li>
|
|
36199
|
+
<li><code>maximumDistance</code>: Number between 0.0 and 1.0 where the <code>fadeInColor</code> becomes the <code>fadeOutColor</code>. A value of 0.0 gives the entire material a color of <code>fadeOutColor</code> and a value of 1.0 gives the the entire material a color of <code>fadeInColor</code></li>
|
|
36200
|
+
<li><code>repeat</code>: true if the fade should wrap around the texture coodinates.</li>
|
|
36201
|
+
<li><code>fadeDirection</code>: Object with x and y values specifying if the fade should be in the x and y directions.</li>
|
|
36202
|
+
<li><code>time</code>: Object with x and y values between 0.0 and 1.0 of the <code>fadeInColor</code> position</li>
|
|
36203
|
+
</ul>
|
|
36204
|
+
<li>PolylineArrow</li>
|
|
36205
|
+
<ul>
|
|
36206
|
+
<li><code>color</code>: diffuse color and alpha.</li>
|
|
36207
|
+
</ul>
|
|
36208
|
+
<li>PolylineDash</li>
|
|
36209
|
+
<ul>
|
|
36210
|
+
<li><code>color</code>: color for the line.</li>
|
|
36211
|
+
<li><code>gapColor</code>: color for the gaps in the line.</li>
|
|
36212
|
+
<li><code>dashLength</code>: Dash length in pixels.</li>
|
|
36213
|
+
<li><code>dashPattern</code>: The 16 bit stipple pattern for the line..</li>
|
|
36214
|
+
</ul>
|
|
36215
|
+
<li>PolylineGlow</li>
|
|
36216
|
+
<ul>
|
|
36217
|
+
<li><code>color</code>: color and maximum alpha for the glow on the line.</li>
|
|
36218
|
+
<li><code>glowPower</code>: strength of the glow, as a percentage of the total line width (less than 1.0).</li>
|
|
36219
|
+
<li><code>taperPower</code>: strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used.</li>
|
|
36220
|
+
</ul>
|
|
36221
|
+
<li>PolylineOutline</li>
|
|
36222
|
+
<ul>
|
|
36223
|
+
<li><code>color</code>: diffuse color and alpha for the interior of the line.</li>
|
|
36224
|
+
<li><code>outlineColor</code>: diffuse color and alpha for the outline.</li>
|
|
36225
|
+
<li><code>outlineWidth</code>: width of the outline in pixels.</li>
|
|
36226
|
+
</ul>
|
|
36227
|
+
<li>ElevationContour</li>
|
|
36228
|
+
<ul>
|
|
36229
|
+
<li><code>color</code>: color and alpha for the contour line.</li>
|
|
36230
|
+
<li><code>spacing</code>: spacing for contour lines in meters.</li>
|
|
36231
|
+
<li><code>width</code>: Number specifying the width of the grid lines in pixels.</li>
|
|
36232
|
+
</ul>
|
|
36233
|
+
<li>ElevationRamp</li>
|
|
36234
|
+
<ul>
|
|
36235
|
+
<li><code>image</code>: color ramp image to use for coloring the terrain.</li>
|
|
36236
|
+
<li><code>minimumHeight</code>: minimum height for the ramp.</li>
|
|
36237
|
+
<li><code>maximumHeight</code>: maximum height for the ramp.</li>
|
|
36238
|
+
</ul>
|
|
36239
|
+
<li>SlopeRamp</li>
|
|
36240
|
+
<ul>
|
|
36241
|
+
<li><code>image</code>: color ramp image to use for coloring the terrain by slope.</li>
|
|
36242
|
+
</ul>
|
|
36243
|
+
<li>AspectRamp</li>
|
|
36244
|
+
<ul>
|
|
36245
|
+
<li><code>image</code>: color ramp image to use for color the terrain by aspect.</li>
|
|
36246
|
+
</ul>
|
|
36247
|
+
<li>ElevationBand</li>
|
|
36248
|
+
<ul>
|
|
36249
|
+
<li><code>heights</code>: image of heights sorted from lowest to highest.</li>
|
|
36250
|
+
<li><code>colors</code>: image of colors at the corresponding heights.</li>
|
|
36251
|
+
</ul>
|
|
36252
|
+
<li>WaterMask</li>
|
|
36253
|
+
<ul>
|
|
36254
|
+
<li><code>waterColor</code>: diffuse color and alpha for the areas covered by water.</li>
|
|
36255
|
+
<li><code>landColor</code>: diffuse color and alpha for the areas covered by land.</li>
|
|
36256
|
+
</ul>
|
|
36257
|
+
</ul>
|
|
36258
|
+
</ul>
|
|
36259
|
+
</div>
|
|
36187
36260
|
* @example
|
|
36188
36261
|
* // Create a color material with fromType:
|
|
36189
|
-
|
|
36190
|
-
|
|
36191
|
-
|
|
36192
|
-
|
|
36193
|
-
|
|
36194
|
-
|
|
36195
|
-
|
|
36196
|
-
|
|
36197
|
-
|
|
36198
|
-
|
|
36199
|
-
|
|
36200
|
-
|
|
36201
|
-
|
|
36202
|
-
|
|
36203
|
-
|
|
36262
|
+
polygon.material = Cesium.Material.fromType('Color');
|
|
36263
|
+
polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
|
|
36264
|
+
|
|
36265
|
+
// Create the default material:
|
|
36266
|
+
polygon.material = new Cesium.Material();
|
|
36267
|
+
|
|
36268
|
+
// Create a color material with full Fabric notation:
|
|
36269
|
+
polygon.material = new Cesium.Material({
|
|
36270
|
+
fabric: {
|
|
36271
|
+
type: 'Color',
|
|
36272
|
+
uniforms: {
|
|
36273
|
+
color: new Cesium.Color(1.0, 1.0, 0.0, 1.0)
|
|
36274
|
+
}
|
|
36275
|
+
}
|
|
36276
|
+
});
|
|
36204
36277
|
* @param [options] - Object with the following properties:
|
|
36205
36278
|
* @param [options.strict = false] - Throws errors for issues that would normally be ignored, including unused uniforms or materials.
|
|
36206
36279
|
* @param [options.translucent = true] - When <code>true</code> or a function that returns <code>true</code>, the geometry
|
|
36207
|
-
|
|
36280
|
+
with this material is expected to appear translucent.
|
|
36208
36281
|
* @param [options.minificationFilter = TextureMinificationFilter.LINEAR] - The {@link TextureMinificationFilter} to apply to this material's textures.
|
|
36209
36282
|
* @param [options.magnificationFilter = TextureMagnificationFilter.LINEAR] - The {@link TextureMagnificationFilter} to apply to this material's textures.
|
|
36210
36283
|
* @param options.fabric - The fabric JSON used to generate the material.
|
|
@@ -36235,17 +36308,17 @@ export class Material {
|
|
|
36235
36308
|
uniforms: any;
|
|
36236
36309
|
/**
|
|
36237
36310
|
* When <code>true</code> or a function that returns <code>true</code>,
|
|
36238
|
-
|
|
36311
|
+
the geometry is expected to appear translucent.
|
|
36239
36312
|
*/
|
|
36240
36313
|
translucent: boolean | ((...params: any[]) => any);
|
|
36241
36314
|
/**
|
|
36242
36315
|
* Creates a new material using an existing material type.
|
|
36243
|
-
|
|
36244
|
-
|
|
36316
|
+
<br /><br />
|
|
36317
|
+
Shorthand for: new Material({fabric : {type : type}});
|
|
36245
36318
|
* @example
|
|
36246
36319
|
* const material = Cesium.Material.fromType('Color', {
|
|
36247
|
-
|
|
36248
|
-
|
|
36320
|
+
color: new Cesium.Color(1.0, 0.0, 0.0, 1.0)
|
|
36321
|
+
});
|
|
36249
36322
|
* @param type - The base material type.
|
|
36250
36323
|
* @param [uniforms] - Overrides for the default uniforms.
|
|
36251
36324
|
* @returns New material object.
|
|
@@ -36258,19 +36331,19 @@ export class Material {
|
|
|
36258
36331
|
isTranslucent(): boolean;
|
|
36259
36332
|
/**
|
|
36260
36333
|
* Returns true if this object was destroyed; otherwise, false.
|
|
36261
|
-
|
|
36262
|
-
|
|
36263
|
-
|
|
36334
|
+
<br /><br />
|
|
36335
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
36336
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
36264
36337
|
* @returns True if this object was destroyed; otherwise, false.
|
|
36265
36338
|
*/
|
|
36266
36339
|
isDestroyed(): boolean;
|
|
36267
36340
|
/**
|
|
36268
36341
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
36269
|
-
|
|
36270
|
-
|
|
36271
|
-
|
|
36272
|
-
|
|
36273
|
-
|
|
36342
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
36343
|
+
<br /><br />
|
|
36344
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
36345
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
36346
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
36274
36347
|
* @example
|
|
36275
36348
|
* material = material && material.destroy();
|
|
36276
36349
|
*/
|
|
@@ -37022,55 +37095,55 @@ export type UniformSpecifier = {
|
|
|
37022
37095
|
|
|
37023
37096
|
/**
|
|
37024
37097
|
* A user defined GLSL shader used with {@link Model} as well
|
|
37025
|
-
|
|
37026
|
-
|
|
37027
|
-
|
|
37028
|
-
|
|
37029
|
-
|
|
37030
|
-
|
|
37031
|
-
|
|
37032
|
-
|
|
37033
|
-
|
|
37034
|
-
|
|
37035
|
-
|
|
37036
|
-
|
|
37037
|
-
|
|
37038
|
-
|
|
37039
|
-
|
|
37040
|
-
|
|
37041
|
-
|
|
37042
|
-
|
|
37043
|
-
|
|
37098
|
+
as {@link Cesium3DTileset}.
|
|
37099
|
+
<p>
|
|
37100
|
+
If texture uniforms are used, additional resource management must be done:
|
|
37101
|
+
</p>
|
|
37102
|
+
<ul>
|
|
37103
|
+
<li>
|
|
37104
|
+
The <code>update</code> function must be called each frame. When a
|
|
37105
|
+
custom shader is passed to a {@link Model} or a
|
|
37106
|
+
{@link Cesium3DTileset}, this step is handled automaticaly
|
|
37107
|
+
</li>
|
|
37108
|
+
<li>
|
|
37109
|
+
{@link CustomShader#destroy} must be called when the custom shader is
|
|
37110
|
+
no longer needed to clean up GPU resources properly. The application
|
|
37111
|
+
is responsible for calling this method.
|
|
37112
|
+
</li>
|
|
37113
|
+
</ul>
|
|
37114
|
+
<p>
|
|
37115
|
+
See the {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide} for more detailed documentation.
|
|
37116
|
+
</p>
|
|
37044
37117
|
* @example
|
|
37045
37118
|
* const customShader = new CustomShader({
|
|
37046
|
-
|
|
37047
|
-
|
|
37048
|
-
|
|
37049
|
-
|
|
37050
|
-
|
|
37051
|
-
|
|
37052
|
-
|
|
37053
|
-
|
|
37054
|
-
|
|
37055
|
-
|
|
37056
|
-
|
|
37057
|
-
|
|
37058
|
-
|
|
37059
|
-
|
|
37060
|
-
|
|
37061
|
-
|
|
37062
|
-
|
|
37063
|
-
|
|
37064
|
-
|
|
37065
|
-
|
|
37066
|
-
|
|
37067
|
-
|
|
37068
|
-
|
|
37069
|
-
|
|
37070
|
-
|
|
37071
|
-
|
|
37072
|
-
|
|
37073
|
-
|
|
37119
|
+
uniforms: {
|
|
37120
|
+
u_colorIndex: {
|
|
37121
|
+
type: Cesium.UniformType.FLOAT,
|
|
37122
|
+
value: 1.0
|
|
37123
|
+
},
|
|
37124
|
+
u_normalMap: {
|
|
37125
|
+
type: Cesium.UniformType.SAMPLER_2D,
|
|
37126
|
+
value: new Cesium.TextureUniform({
|
|
37127
|
+
url: "http://example.com/normal.png"
|
|
37128
|
+
})
|
|
37129
|
+
}
|
|
37130
|
+
},
|
|
37131
|
+
varyings: {
|
|
37132
|
+
v_selectedColor: Cesium.VaryingType.VEC3
|
|
37133
|
+
},
|
|
37134
|
+
vertexShaderText: `
|
|
37135
|
+
void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
|
|
37136
|
+
v_selectedColor = mix(vsInput.attributes.color_0, vsInput.attributes.color_1, u_colorIndex);
|
|
37137
|
+
vsOutput.positionMC += 0.1 * vsInput.attributes.normal;
|
|
37138
|
+
}
|
|
37139
|
+
`,
|
|
37140
|
+
fragmentShaderText: `
|
|
37141
|
+
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
|
|
37142
|
+
material.normal = texture(u_normalMap, fsInput.attributes.texCoord_0);
|
|
37143
|
+
material.diffuse = v_selectedColor;
|
|
37144
|
+
}
|
|
37145
|
+
`
|
|
37146
|
+
});
|
|
37074
37147
|
* @param options - An object with the following options
|
|
37075
37148
|
* @param [options.mode = CustomShaderMode.MODIFY_MATERIAL] - The custom shader mode, which determines how the custom shader code is inserted into the fragment shader.
|
|
37076
37149
|
* @param [options.lightingModel] - The lighting model (e.g. PBR or unlit). If present, this overrides the default lighting for the model.
|
|
@@ -37096,12 +37169,12 @@ export class CustomShader {
|
|
|
37096
37169
|
});
|
|
37097
37170
|
/**
|
|
37098
37171
|
* A value determining how the custom shader interacts with the overall
|
|
37099
|
-
|
|
37172
|
+
fragment shader. This is used by {@link CustomShaderPipelineStage}
|
|
37100
37173
|
*/
|
|
37101
37174
|
readonly mode: CustomShaderMode;
|
|
37102
37175
|
/**
|
|
37103
37176
|
* The lighting model to use when using the custom shader.
|
|
37104
|
-
|
|
37177
|
+
This is used by {@link CustomShaderPipelineStage}
|
|
37105
37178
|
*/
|
|
37106
37179
|
readonly lightingModel: LightingModel;
|
|
37107
37180
|
/**
|
|
@@ -37112,7 +37185,7 @@ export class CustomShader {
|
|
|
37112
37185
|
};
|
|
37113
37186
|
/**
|
|
37114
37187
|
* Additional varyings as declared by the user.
|
|
37115
|
-
|
|
37188
|
+
This is used by {@link CustomShaderPipelineStage}
|
|
37116
37189
|
*/
|
|
37117
37190
|
readonly varyings: {
|
|
37118
37191
|
[key: string]: VaryingType;
|
|
@@ -37127,9 +37200,9 @@ export class CustomShader {
|
|
|
37127
37200
|
readonly fragmentShaderText: string;
|
|
37128
37201
|
/**
|
|
37129
37202
|
* The translucency mode, which determines how the custom shader will be applied. If the value is
|
|
37130
|
-
|
|
37131
|
-
|
|
37132
|
-
|
|
37203
|
+
CustomShaderTransulcencyMode.OPAQUE or CustomShaderTransulcencyMode.TRANSLUCENT, the custom shader
|
|
37204
|
+
will override settings from the model's material. If the value isCustomShaderTransulcencyMode.INHERIT,
|
|
37205
|
+
the custom shader will render as either opaque or translucent depending on the primitive's material settings.
|
|
37133
37206
|
*/
|
|
37134
37207
|
readonly translucencyMode: CustomShaderTranslucencyMode;
|
|
37135
37208
|
/**
|
|
@@ -37140,19 +37213,19 @@ export class CustomShader {
|
|
|
37140
37213
|
setUniform(uniformName: string, value: boolean | number | Cartesian2 | Cartesian3 | Cartesian4 | Matrix2 | Matrix3 | Matrix4 | string | Resource | TextureUniform): void;
|
|
37141
37214
|
/**
|
|
37142
37215
|
* Returns true if this object was destroyed; otherwise, false.
|
|
37143
|
-
|
|
37144
|
-
|
|
37145
|
-
|
|
37216
|
+
<br /><br />
|
|
37217
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
37218
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
37146
37219
|
* @returns True if this object was destroyed; otherwise, false.
|
|
37147
37220
|
*/
|
|
37148
37221
|
isDestroyed(): boolean;
|
|
37149
37222
|
/**
|
|
37150
37223
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37224
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
37225
|
+
<br /><br />
|
|
37226
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
37227
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
37228
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
37156
37229
|
* @example
|
|
37157
37230
|
* customShader = customShader && customShader.destroy();
|
|
37158
37231
|
*/
|
|
@@ -38675,9 +38748,9 @@ export enum VaryingType {
|
|
|
38675
38748
|
/**
|
|
38676
38749
|
* A 3x3 matrix of floating point values.
|
|
38677
38750
|
*/
|
|
38678
|
-
MAT3 = "
|
|
38751
|
+
MAT3 = "mat3",
|
|
38679
38752
|
/**
|
|
38680
|
-
* A
|
|
38753
|
+
* A 4x4 matrix of floating point values.
|
|
38681
38754
|
*/
|
|
38682
38755
|
MAT4 = "mat4"
|
|
38683
38756
|
}
|
|
@@ -40714,88 +40787,88 @@ export enum PostProcessStageSampleMode {
|
|
|
40714
40787
|
|
|
40715
40788
|
/**
|
|
40716
40789
|
* A primitive represents geometry in the {@link Scene}. The geometry can be from a single {@link GeometryInstance}
|
|
40717
|
-
|
|
40718
|
-
|
|
40719
|
-
|
|
40720
|
-
|
|
40721
|
-
|
|
40722
|
-
|
|
40723
|
-
|
|
40724
|
-
|
|
40725
|
-
|
|
40726
|
-
|
|
40727
|
-
|
|
40728
|
-
|
|
40729
|
-
|
|
40730
|
-
|
|
40731
|
-
|
|
40732
|
-
|
|
40733
|
-
|
|
40734
|
-
|
|
40790
|
+
as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
40791
|
+
geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
40792
|
+
<p>
|
|
40793
|
+
A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
40794
|
+
{@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
40795
|
+
and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
40796
|
+
and match most of them and add a new geometry or appearance independently of each other.
|
|
40797
|
+
</p>
|
|
40798
|
+
<p>
|
|
40799
|
+
Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
40800
|
+
Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
40801
|
+
per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
40802
|
+
</p>
|
|
40803
|
+
<p>
|
|
40804
|
+
{@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
40805
|
+
show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
40806
|
+
shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
40807
|
+
</p>
|
|
40735
40808
|
* @example
|
|
40736
40809
|
* // 1. Draw a translucent ellipse on the surface with a checkerboard pattern
|
|
40737
|
-
|
|
40738
|
-
|
|
40739
|
-
|
|
40740
|
-
|
|
40741
|
-
|
|
40742
|
-
|
|
40743
|
-
|
|
40744
|
-
|
|
40745
|
-
|
|
40746
|
-
|
|
40747
|
-
|
|
40748
|
-
|
|
40749
|
-
|
|
40750
|
-
|
|
40751
|
-
|
|
40752
|
-
|
|
40810
|
+
const instance = new Cesium.GeometryInstance({
|
|
40811
|
+
geometry : new Cesium.EllipseGeometry({
|
|
40812
|
+
center : Cesium.Cartesian3.fromDegrees(-100.0, 20.0),
|
|
40813
|
+
semiMinorAxis : 500000.0,
|
|
40814
|
+
semiMajorAxis : 1000000.0,
|
|
40815
|
+
rotation : Cesium.Math.PI_OVER_FOUR,
|
|
40816
|
+
vertexFormat : Cesium.VertexFormat.POSITION_AND_ST
|
|
40817
|
+
}),
|
|
40818
|
+
id : 'object returned when this instance is picked and to get/set per-instance attributes'
|
|
40819
|
+
});
|
|
40820
|
+
scene.primitives.add(new Cesium.Primitive({
|
|
40821
|
+
geometryInstances : instance,
|
|
40822
|
+
appearance : new Cesium.EllipsoidSurfaceAppearance({
|
|
40823
|
+
material : Cesium.Material.fromType('Checkerboard')
|
|
40824
|
+
})
|
|
40825
|
+
}));
|
|
40753
40826
|
* @example
|
|
40754
40827
|
* // 2. Draw different instances each with a unique color
|
|
40755
|
-
|
|
40756
|
-
|
|
40757
|
-
|
|
40758
|
-
|
|
40759
|
-
|
|
40760
|
-
|
|
40761
|
-
|
|
40762
|
-
|
|
40763
|
-
|
|
40764
|
-
|
|
40765
|
-
|
|
40766
|
-
|
|
40767
|
-
|
|
40768
|
-
|
|
40769
|
-
|
|
40770
|
-
|
|
40771
|
-
|
|
40772
|
-
|
|
40773
|
-
|
|
40774
|
-
|
|
40775
|
-
|
|
40776
|
-
|
|
40777
|
-
|
|
40778
|
-
|
|
40779
|
-
|
|
40780
|
-
|
|
40828
|
+
const rectangleInstance = new Cesium.GeometryInstance({
|
|
40829
|
+
geometry : new Cesium.RectangleGeometry({
|
|
40830
|
+
rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0),
|
|
40831
|
+
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
|
|
40832
|
+
}),
|
|
40833
|
+
id : 'rectangle',
|
|
40834
|
+
attributes : {
|
|
40835
|
+
color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
|
|
40836
|
+
}
|
|
40837
|
+
});
|
|
40838
|
+
const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
40839
|
+
geometry : new Cesium.EllipsoidGeometry({
|
|
40840
|
+
radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
40841
|
+
vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
40842
|
+
}),
|
|
40843
|
+
modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
40844
|
+
Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
40845
|
+
id : 'ellipsoid',
|
|
40846
|
+
attributes : {
|
|
40847
|
+
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
40848
|
+
}
|
|
40849
|
+
});
|
|
40850
|
+
scene.primitives.add(new Cesium.Primitive({
|
|
40851
|
+
geometryInstances : [rectangleInstance, ellipsoidInstance],
|
|
40852
|
+
appearance : new Cesium.PerInstanceColorAppearance()
|
|
40853
|
+
}));
|
|
40781
40854
|
* @example
|
|
40782
40855
|
* // 3. Create the geometry on the main thread.
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
|
|
40786
|
-
|
|
40787
|
-
|
|
40788
|
-
|
|
40789
|
-
|
|
40790
|
-
|
|
40791
|
-
|
|
40792
|
-
|
|
40793
|
-
|
|
40794
|
-
|
|
40795
|
-
|
|
40796
|
-
|
|
40797
|
-
|
|
40798
|
-
|
|
40856
|
+
scene.primitives.add(new Cesium.Primitive({
|
|
40857
|
+
geometryInstances : new Cesium.GeometryInstance({
|
|
40858
|
+
geometry : Cesium.EllipsoidGeometry.createGeometry(new Cesium.EllipsoidGeometry({
|
|
40859
|
+
radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
40860
|
+
vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
40861
|
+
})),
|
|
40862
|
+
modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
40863
|
+
Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
40864
|
+
id : 'ellipsoid',
|
|
40865
|
+
attributes : {
|
|
40866
|
+
color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
40867
|
+
}
|
|
40868
|
+
}),
|
|
40869
|
+
appearance : new Cesium.PerInstanceColorAppearance(),
|
|
40870
|
+
asynchronous : false
|
|
40871
|
+
}));
|
|
40799
40872
|
* @param [options] - Object with the following properties:
|
|
40800
40873
|
* @param [options.geometryInstances] - The geometry instances - or a single geometry instance - to render.
|
|
40801
40874
|
* @param [options.appearance] - The appearance used to render the primitive.
|
|
@@ -40831,67 +40904,67 @@ export class Primitive {
|
|
|
40831
40904
|
});
|
|
40832
40905
|
/**
|
|
40833
40906
|
* The geometry instances rendered with this primitive. This may
|
|
40834
|
-
|
|
40835
|
-
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
|
|
40907
|
+
be <code>undefined</code> if <code>options.releaseGeometryInstances</code>
|
|
40908
|
+
is <code>true</code> when the primitive is constructed.
|
|
40909
|
+
<p>
|
|
40910
|
+
Changing this property after the primitive is rendered has no effect.
|
|
40911
|
+
</p>
|
|
40839
40912
|
*/
|
|
40840
40913
|
readonly geometryInstances: GeometryInstance[] | GeometryInstance;
|
|
40841
40914
|
/**
|
|
40842
40915
|
* The {@link Appearance} used to shade this primitive. Each geometry
|
|
40843
|
-
|
|
40844
|
-
|
|
40845
|
-
|
|
40916
|
+
instance is shaded with the same appearance. Some appearances, like
|
|
40917
|
+
{@link PerInstanceColorAppearance} allow giving each instance unique
|
|
40918
|
+
properties.
|
|
40846
40919
|
*/
|
|
40847
40920
|
appearance: Appearance;
|
|
40848
40921
|
/**
|
|
40849
40922
|
* The {@link Appearance} used to shade this primitive when it fails the depth test. Each geometry
|
|
40850
|
-
|
|
40851
|
-
|
|
40852
|
-
|
|
40853
|
-
|
|
40854
|
-
|
|
40855
|
-
|
|
40856
|
-
|
|
40857
|
-
|
|
40858
|
-
|
|
40859
|
-
|
|
40860
|
-
|
|
40861
|
-
|
|
40862
|
-
|
|
40923
|
+
instance is shaded with the same appearance. Some appearances, like
|
|
40924
|
+
{@link PerInstanceColorAppearance} allow giving each instance unique
|
|
40925
|
+
properties.
|
|
40926
|
+
|
|
40927
|
+
<p>
|
|
40928
|
+
When using an appearance that requires a color attribute, like PerInstanceColorAppearance,
|
|
40929
|
+
add a depthFailColor per-instance attribute instead.
|
|
40930
|
+
</p>
|
|
40931
|
+
|
|
40932
|
+
<p>
|
|
40933
|
+
Requires the EXT_frag_depth WebGL extension to render properly. If the extension is not supported,
|
|
40934
|
+
there may be artifacts.
|
|
40935
|
+
</p>
|
|
40863
40936
|
*/
|
|
40864
40937
|
depthFailAppearance: Appearance;
|
|
40865
40938
|
/**
|
|
40866
40939
|
* The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
|
|
40867
|
-
|
|
40868
|
-
|
|
40869
|
-
|
|
40870
|
-
|
|
40871
|
-
|
|
40872
|
-
|
|
40873
|
-
|
|
40940
|
+
When this is the identity matrix, the primitive is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
40941
|
+
Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
40942
|
+
by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
40943
|
+
|
|
40944
|
+
<p>
|
|
40945
|
+
This property is only supported in 3D mode.
|
|
40946
|
+
</p>
|
|
40874
40947
|
* @example
|
|
40875
40948
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
40876
|
-
|
|
40949
|
+
p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
40877
40950
|
*/
|
|
40878
40951
|
modelMatrix: Matrix4;
|
|
40879
40952
|
/**
|
|
40880
40953
|
* Determines if the primitive will be shown. This affects all geometry
|
|
40881
|
-
|
|
40954
|
+
instances in the primitive.
|
|
40882
40955
|
*/
|
|
40883
40956
|
show: boolean;
|
|
40884
40957
|
/**
|
|
40885
40958
|
* When <code>true</code>, the renderer frustum culls and horizon culls the primitive's commands
|
|
40886
|
-
|
|
40887
|
-
|
|
40959
|
+
based on their bounding volume. Set this to <code>false</code> for a small performance gain
|
|
40960
|
+
if you are manually culling the primitive.
|
|
40888
40961
|
*/
|
|
40889
40962
|
cull: boolean;
|
|
40890
40963
|
/**
|
|
40891
40964
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
|
|
40965
|
+
<p>
|
|
40966
|
+
Draws the bounding sphere for each draw command in the primitive.
|
|
40967
|
+
</p>
|
|
40895
40968
|
*/
|
|
40896
40969
|
debugShowBoundingVolume: boolean;
|
|
40897
40970
|
/**
|
|
@@ -40924,60 +40997,60 @@ export class Primitive {
|
|
|
40924
40997
|
readonly compressVertices: boolean;
|
|
40925
40998
|
/**
|
|
40926
40999
|
* Determines if the primitive is complete and ready to render. If this property is
|
|
40927
|
-
|
|
40928
|
-
|
|
41000
|
+
true, the primitive will be rendered the next time that {@link Primitive#update}
|
|
41001
|
+
is called.
|
|
40929
41002
|
* @example
|
|
40930
41003
|
* // Wait for a primitive to become ready before accessing attributes
|
|
40931
|
-
|
|
40932
|
-
|
|
40933
|
-
|
|
40934
|
-
|
|
40935
|
-
|
|
40936
|
-
|
|
40937
|
-
|
|
40938
|
-
|
|
40939
|
-
|
|
40940
|
-
|
|
41004
|
+
const removeListener = scene.postRender.addEventListener(() => {
|
|
41005
|
+
if (!frustumPrimitive.ready) {
|
|
41006
|
+
return;
|
|
41007
|
+
}
|
|
41008
|
+
|
|
41009
|
+
const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
41010
|
+
attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
41011
|
+
|
|
41012
|
+
removeListener();
|
|
41013
|
+
});
|
|
40941
41014
|
*/
|
|
40942
41015
|
readonly ready: boolean;
|
|
40943
41016
|
/**
|
|
40944
41017
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
40945
|
-
|
|
40946
|
-
|
|
40947
|
-
|
|
40948
|
-
|
|
40949
|
-
|
|
41018
|
+
get the draw commands needed to render this primitive.
|
|
41019
|
+
<p>
|
|
41020
|
+
Do not call this function directly. This is documented just to
|
|
41021
|
+
list the exceptions that may be propagated when the scene is rendered:
|
|
41022
|
+
</p>
|
|
40950
41023
|
*/
|
|
40951
41024
|
update(): void;
|
|
40952
41025
|
/**
|
|
40953
41026
|
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
|
|
40954
41027
|
* @example
|
|
40955
41028
|
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
40956
|
-
|
|
40957
|
-
|
|
40958
|
-
|
|
40959
|
-
|
|
41029
|
+
attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
41030
|
+
attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);
|
|
41031
|
+
attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(100.0, 10000.0);
|
|
41032
|
+
attributes.offset = Cesium.OffsetGeometryInstanceAttribute.toValue(Cartesian3.IDENTITY);
|
|
40960
41033
|
* @param id - The id of the {@link GeometryInstance}.
|
|
40961
41034
|
* @returns The typed array in the attribute's format or undefined if the is no instance with id.
|
|
40962
41035
|
*/
|
|
40963
41036
|
getGeometryInstanceAttributes(id: any): any;
|
|
40964
41037
|
/**
|
|
40965
41038
|
* Returns true if this object was destroyed; otherwise, false.
|
|
40966
|
-
|
|
40967
|
-
|
|
40968
|
-
|
|
40969
|
-
|
|
41039
|
+
<p>
|
|
41040
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
41041
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
41042
|
+
</p>
|
|
40970
41043
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
40971
41044
|
*/
|
|
40972
41045
|
isDestroyed(): boolean;
|
|
40973
41046
|
/**
|
|
40974
41047
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
40975
|
-
|
|
40976
|
-
|
|
40977
|
-
|
|
40978
|
-
|
|
40979
|
-
|
|
40980
|
-
|
|
41048
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
41049
|
+
<p>
|
|
41050
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
41051
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
41052
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
41053
|
+
</p>
|
|
40981
41054
|
* @example
|
|
40982
41055
|
* e = e && e.destroy();
|
|
40983
41056
|
*/
|
|
@@ -41138,17 +41211,53 @@ export class PrimitiveCollection {
|
|
|
41138
41211
|
destroy(): void;
|
|
41139
41212
|
}
|
|
41140
41213
|
|
|
41214
|
+
/**
|
|
41215
|
+
* A simple Least Recently Used (LRU) cache implementation.
|
|
41216
|
+
*/
|
|
41217
|
+
export class LRUCache {
|
|
41218
|
+
}
|
|
41219
|
+
|
|
41220
|
+
/**
|
|
41221
|
+
* Creates a spatial hash key for the given longitude, latitude, and tile level.
|
|
41222
|
+
The precision is adjusted based on the tile level and extent to achieve finer precision at higher levels.
|
|
41223
|
+
|
|
41224
|
+
This function calculates the spatial hash key by first determining the precision at the given tile for the current maximum screenspace error (MAX_ERROR_PX),
|
|
41225
|
+
and then rounding the longitude and latitude to that precision for consistency.
|
|
41226
|
+
|
|
41227
|
+
The steps for computing the level precision are as follows:
|
|
41228
|
+
|
|
41229
|
+
1. Compute the resolution (meters per pixel) at the given level:
|
|
41230
|
+
level_resolution_m = (2 * PI * RADIUS) / (2^level * TILE_SIZE)
|
|
41231
|
+
|
|
41232
|
+
2. Compute the target precision in meters:
|
|
41233
|
+
level_precision_m = level_resolution_m * MAX_ERROR_PX
|
|
41234
|
+
|
|
41235
|
+
3. Compute the target precision to radians:
|
|
41236
|
+
level_precision_rad = level_precision_m / BODY_RADIUS
|
|
41237
|
+
|
|
41238
|
+
This simplifies to:
|
|
41239
|
+
level_precision_rad = (2 * PI * MAX_ERROR_PX) / (2^level * TILE_SIZE)
|
|
41240
|
+
which can also be written as:
|
|
41241
|
+
level_precision_rad = (PI * MAX_ERROR_PX) / (2^(level-1) * TILE_SIZE)
|
|
41242
|
+
|
|
41243
|
+
The computed level_precision_rad is then used to round the input longitude and latitude,
|
|
41244
|
+
ensuring that positions that fall within the same spatial bin produce the same hash key.
|
|
41245
|
+
|
|
41246
|
+
The constants below are computed once since they are fixed for the given configuration.
|
|
41247
|
+
*/
|
|
41248
|
+
export const TILE_SIZE = 256;
|
|
41249
|
+
|
|
41141
41250
|
/**
|
|
41142
41251
|
* The container for all 3D graphical objects and state in a Cesium virtual scene. Generally,
|
|
41143
|
-
|
|
41252
|
+
a scene is not created directly; instead, it is implicitly created by {@link CesiumWidget}.
|
|
41144
41253
|
* @example
|
|
41145
41254
|
* // Create scene without anisotropic texture filtering
|
|
41146
|
-
|
|
41147
|
-
|
|
41148
|
-
|
|
41149
|
-
|
|
41150
|
-
|
|
41151
|
-
|
|
41255
|
+
const scene = new Cesium.Scene({
|
|
41256
|
+
canvas : canvas,
|
|
41257
|
+
contextOptions : {
|
|
41258
|
+
allowTextureFilterAnisotropic : false
|
|
41259
|
+
}
|
|
41260
|
+
});
|
|
41152
41261
|
* @param options - Object with the following properties:
|
|
41153
41262
|
* @param options.canvas - The HTML canvas element to create the scene for.
|
|
41154
41263
|
* @param [options.contextOptions] - Context and WebGL creation properties.
|
|
@@ -41184,14 +41293,14 @@ export class Scene {
|
|
|
41184
41293
|
});
|
|
41185
41294
|
/**
|
|
41186
41295
|
* Exceptions occurring in <code>render</code> are always caught in order to raise the
|
|
41187
|
-
|
|
41188
|
-
|
|
41189
|
-
|
|
41296
|
+
<code>renderError</code> event. If this property is true, the error is rethrown
|
|
41297
|
+
after the event is raised. If this property is false, the <code>render</code> function
|
|
41298
|
+
returns normally after raising the event.
|
|
41190
41299
|
*/
|
|
41191
41300
|
rethrowRenderErrors: boolean;
|
|
41192
41301
|
/**
|
|
41193
41302
|
* Determines whether or not to instantly complete the
|
|
41194
|
-
|
|
41303
|
+
scene transition animation on user input.
|
|
41195
41304
|
*/
|
|
41196
41305
|
completeMorphOnUserInput: boolean;
|
|
41197
41306
|
/**
|
|
@@ -41228,106 +41337,106 @@ export class Scene {
|
|
|
41228
41337
|
backgroundColor: Color;
|
|
41229
41338
|
/**
|
|
41230
41339
|
* The current morph transition time between 2D/Columbus View and 3D,
|
|
41231
|
-
|
|
41340
|
+
with 0.0 being 2D or Columbus View and 1.0 being 3D.
|
|
41232
41341
|
*/
|
|
41233
41342
|
morphTime: number;
|
|
41234
41343
|
/**
|
|
41235
41344
|
* The far-to-near ratio of the multi-frustum when using a normal depth buffer.
|
|
41236
|
-
|
|
41237
|
-
|
|
41238
|
-
|
|
41239
|
-
|
|
41240
|
-
|
|
41345
|
+
<p>
|
|
41346
|
+
This value is used to create the near and far values for each frustum of the multi-frustum. It is only used
|
|
41347
|
+
when {@link Scene#logarithmicDepthBuffer} is <code>false</code>. When <code>logarithmicDepthBuffer</code> is
|
|
41348
|
+
<code>true</code>, use {@link Scene#logarithmicDepthFarToNearRatio}.
|
|
41349
|
+
</p>
|
|
41241
41350
|
*/
|
|
41242
41351
|
farToNearRatio: number;
|
|
41243
41352
|
/**
|
|
41244
41353
|
* The far-to-near ratio of the multi-frustum when using a logarithmic depth buffer.
|
|
41245
|
-
|
|
41246
|
-
|
|
41247
|
-
|
|
41248
|
-
|
|
41249
|
-
|
|
41354
|
+
<p>
|
|
41355
|
+
This value is used to create the near and far values for each frustum of the multi-frustum. It is only used
|
|
41356
|
+
when {@link Scene#logarithmicDepthBuffer} is <code>true</code>. When <code>logarithmicDepthBuffer</code> is
|
|
41357
|
+
<code>false</code>, use {@link Scene#farToNearRatio}.
|
|
41358
|
+
</p>
|
|
41250
41359
|
*/
|
|
41251
41360
|
logarithmicDepthFarToNearRatio: number;
|
|
41252
41361
|
/**
|
|
41253
41362
|
* Determines the uniform depth size in meters of each frustum of the multifrustum in 2D. If a primitive or model close
|
|
41254
|
-
|
|
41255
|
-
|
|
41363
|
+
to the surface shows z-fighting, decreasing this will eliminate the artifact, but decrease performance. On the
|
|
41364
|
+
other hand, increasing this will increase performance but may cause z-fighting among primitives close to the surface.
|
|
41256
41365
|
*/
|
|
41257
41366
|
nearToFarDistance2D: number;
|
|
41258
41367
|
/**
|
|
41259
41368
|
* The vertical exaggeration of the scene.
|
|
41260
|
-
|
|
41369
|
+
When set to 1.0, no exaggeration is applied.
|
|
41261
41370
|
*/
|
|
41262
41371
|
verticalExaggeration: number;
|
|
41263
41372
|
/**
|
|
41264
41373
|
* The reference height for vertical exaggeration of the scene.
|
|
41265
|
-
|
|
41374
|
+
When set to 0.0, the exaggeration is applied relative to the ellipsoid surface.
|
|
41266
41375
|
*/
|
|
41267
41376
|
verticalExaggerationRelativeHeight: number;
|
|
41268
41377
|
/**
|
|
41269
41378
|
* This property is for debugging only; it is not for production use.
|
|
41270
|
-
|
|
41271
|
-
|
|
41272
|
-
|
|
41273
|
-
|
|
41274
|
-
|
|
41275
|
-
|
|
41276
|
-
|
|
41277
|
-
|
|
41379
|
+
<p>
|
|
41380
|
+
A function that determines what commands are executed. As shown in the examples below,
|
|
41381
|
+
the function receives the command's <code>owner</code> as an argument, and returns a boolean indicating if the
|
|
41382
|
+
command should be executed.
|
|
41383
|
+
</p>
|
|
41384
|
+
<p>
|
|
41385
|
+
The default is <code>undefined</code>, indicating that all commands are executed.
|
|
41386
|
+
</p>
|
|
41278
41387
|
* @example
|
|
41279
41388
|
* // Do not execute any commands.
|
|
41280
|
-
|
|
41281
|
-
|
|
41282
|
-
|
|
41283
|
-
|
|
41284
|
-
|
|
41285
|
-
|
|
41286
|
-
|
|
41287
|
-
|
|
41288
|
-
|
|
41389
|
+
scene.debugCommandFilter = function(command) {
|
|
41390
|
+
return false;
|
|
41391
|
+
};
|
|
41392
|
+
|
|
41393
|
+
// Execute only the billboard's commands. That is, only draw the billboard.
|
|
41394
|
+
const billboards = new Cesium.BillboardCollection();
|
|
41395
|
+
scene.debugCommandFilter = function(command) {
|
|
41396
|
+
return command.owner === billboards;
|
|
41397
|
+
};
|
|
41289
41398
|
*/
|
|
41290
41399
|
debugCommandFilter: (...params: any[]) => any;
|
|
41291
41400
|
/**
|
|
41292
41401
|
* This property is for debugging only; it is not for production use.
|
|
41293
|
-
|
|
41294
|
-
|
|
41295
|
-
|
|
41296
|
-
|
|
41297
|
-
|
|
41402
|
+
<p>
|
|
41403
|
+
When <code>true</code>, commands are randomly shaded. This is useful
|
|
41404
|
+
for performance analysis to see what parts of a scene or model are
|
|
41405
|
+
command-dense and could benefit from batching.
|
|
41406
|
+
</p>
|
|
41298
41407
|
*/
|
|
41299
41408
|
debugShowCommands: boolean;
|
|
41300
41409
|
/**
|
|
41301
41410
|
* This property is for debugging only; it is not for production use.
|
|
41302
|
-
|
|
41303
|
-
|
|
41304
|
-
|
|
41305
|
-
|
|
41306
|
-
|
|
41307
|
-
|
|
41308
|
-
|
|
41309
|
-
|
|
41411
|
+
<p>
|
|
41412
|
+
When <code>true</code>, commands are shaded based on the frustums they
|
|
41413
|
+
overlap. Commands in the closest frustum are tinted red, commands in
|
|
41414
|
+
the next closest are green, and commands in the farthest frustum are
|
|
41415
|
+
blue. If a command overlaps more than one frustum, the color components
|
|
41416
|
+
are combined, e.g., a command overlapping the first two frustums is tinted
|
|
41417
|
+
yellow.
|
|
41418
|
+
</p>
|
|
41310
41419
|
*/
|
|
41311
41420
|
debugShowFrustums: boolean;
|
|
41312
41421
|
/**
|
|
41313
41422
|
* This property is for debugging only; it is not for production use.
|
|
41314
|
-
|
|
41315
|
-
|
|
41316
|
-
|
|
41423
|
+
<p>
|
|
41424
|
+
Displays frames per second and time between frames.
|
|
41425
|
+
</p>
|
|
41317
41426
|
*/
|
|
41318
41427
|
debugShowFramesPerSecond: boolean;
|
|
41319
41428
|
/**
|
|
41320
41429
|
* This property is for debugging only; it is not for production use.
|
|
41321
|
-
|
|
41322
|
-
|
|
41323
|
-
|
|
41430
|
+
<p>
|
|
41431
|
+
Indicates which frustum will have depth information displayed.
|
|
41432
|
+
</p>
|
|
41324
41433
|
*/
|
|
41325
41434
|
debugShowDepthFrustum: number;
|
|
41326
41435
|
/**
|
|
41327
41436
|
* This property is for debugging only; it is not for production use.
|
|
41328
|
-
|
|
41329
|
-
|
|
41330
|
-
|
|
41437
|
+
<p>
|
|
41438
|
+
When <code>true</code>, draws outlines to show the boundaries of the camera frustums
|
|
41439
|
+
</p>
|
|
41331
41440
|
*/
|
|
41332
41441
|
debugShowFrustumPlanes: boolean;
|
|
41333
41442
|
/**
|
|
@@ -41336,33 +41445,33 @@ export class Scene {
|
|
|
41336
41445
|
useDepthPicking: boolean;
|
|
41337
41446
|
/**
|
|
41338
41447
|
* When <code>true</code>, enables picking translucent geometry using the depth buffer. Note that {@link Scene#useDepthPicking} must also be true for enabling this to work.
|
|
41339
|
-
|
|
41340
|
-
|
|
41341
|
-
|
|
41342
|
-
|
|
41343
|
-
|
|
41448
|
+
|
|
41449
|
+
<p>
|
|
41450
|
+
There is a decrease in performance when enabled. There are extra draw calls to write depth for
|
|
41451
|
+
translucent geometry.
|
|
41452
|
+
</p>
|
|
41344
41453
|
* @example
|
|
41345
41454
|
* // picking the position of a translucent primitive
|
|
41346
|
-
|
|
41347
|
-
|
|
41348
|
-
|
|
41349
|
-
|
|
41350
|
-
|
|
41351
|
-
|
|
41352
|
-
|
|
41353
|
-
|
|
41455
|
+
viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
|
|
41456
|
+
const pickedFeature = viewer.scene.pick(movement.position);
|
|
41457
|
+
if (!Cesium.defined(pickedFeature)) {
|
|
41458
|
+
// nothing picked
|
|
41459
|
+
return;
|
|
41460
|
+
}
|
|
41461
|
+
const worldPosition = viewer.scene.pickPosition(movement.position);
|
|
41462
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
41354
41463
|
*/
|
|
41355
41464
|
pickTranslucentDepth: boolean;
|
|
41356
41465
|
/**
|
|
41357
41466
|
* Settings for atmosphere lighting effects affecting 3D Tiles and model rendering. This is not to be confused with
|
|
41358
|
-
|
|
41467
|
+
{@link Scene#skyAtmosphere} which is responsible for rendering the sky.
|
|
41359
41468
|
*/
|
|
41360
41469
|
atmosphere: Atmosphere;
|
|
41361
41470
|
/**
|
|
41362
41471
|
* Blends the atmosphere to geometry far from the camera for horizon views. Allows for additional
|
|
41363
|
-
|
|
41364
|
-
|
|
41365
|
-
|
|
41472
|
+
performance improvements by rendering less geometry and dispatching less terrain requests.
|
|
41473
|
+
|
|
41474
|
+
Disbaled by default if an ellipsoid other than WGS84 is used.
|
|
41366
41475
|
*/
|
|
41367
41476
|
fog: Fog;
|
|
41368
41477
|
/**
|
|
@@ -41371,13 +41480,13 @@ export class Scene {
|
|
|
41371
41480
|
shadowMap: ShadowMap;
|
|
41372
41481
|
/**
|
|
41373
41482
|
* When <code>false</code>, 3D Tiles will render normally. When <code>true</code>, classified 3D Tile geometry will render normally and
|
|
41374
|
-
|
|
41483
|
+
unclassified 3D Tile geometry will render with the color multiplied by {@link Scene#invertClassificationColor}.
|
|
41375
41484
|
*/
|
|
41376
41485
|
invertClassification: boolean;
|
|
41377
41486
|
/**
|
|
41378
41487
|
* The highlight color of unclassified 3D Tile geometry when {@link Scene#invertClassification} is <code>true</code>.
|
|
41379
|
-
|
|
41380
|
-
|
|
41488
|
+
<p>When the color's alpha is less than 1.0, the unclassified portions of the 3D Tiles will not blend correctly with the classified positions of the 3D Tiles.</p>
|
|
41489
|
+
<p>Also, when the color's alpha is less than 1.0, the WEBGL_depth_texture and EXT_frag_depth WebGL extensions must be supported.</p>
|
|
41381
41490
|
*/
|
|
41382
41491
|
invertClassificationColor: Color;
|
|
41383
41492
|
/**
|
|
@@ -41394,18 +41503,18 @@ export class Scene {
|
|
|
41394
41503
|
postProcessStages: PostProcessStageCollection;
|
|
41395
41504
|
/**
|
|
41396
41505
|
* When <code>true</code>, rendering a frame will only occur when needed as determined by changes within the scene.
|
|
41397
|
-
|
|
41398
|
-
|
|
41399
|
-
|
|
41506
|
+
Enabling improves performance of the application, but requires using {@link Scene#requestRender}
|
|
41507
|
+
to render a new frame explicitly in this mode. This will be necessary in many cases after making changes
|
|
41508
|
+
to the scene in other parts of the API.
|
|
41400
41509
|
*/
|
|
41401
41510
|
requestRenderMode: boolean;
|
|
41402
41511
|
/**
|
|
41403
41512
|
* If {@link Scene#requestRenderMode} is <code>true</code>, this value defines the maximum change in
|
|
41404
|
-
|
|
41405
|
-
|
|
41406
|
-
|
|
41407
|
-
|
|
41408
|
-
|
|
41513
|
+
simulation time allowed before a render is requested. Lower values increase the number of frames rendered
|
|
41514
|
+
and higher values decrease the number of frames rendered. If <code>undefined</code>, changes to
|
|
41515
|
+
the simulation time will never request a render.
|
|
41516
|
+
This value impacts the rate of rendering for changes in the scene like lighting, entity property updates,
|
|
41517
|
+
and animations.
|
|
41409
41518
|
*/
|
|
41410
41519
|
maximumRenderTimeChange: number;
|
|
41411
41520
|
/**
|
|
@@ -41422,7 +41531,7 @@ export class Scene {
|
|
|
41422
41531
|
light: Light;
|
|
41423
41532
|
/**
|
|
41424
41533
|
* Use this to set the default value for {@link Scene#logarithmicDepthBuffer} in newly constructed Scenes
|
|
41425
|
-
|
|
41534
|
+
This property relies on fragmentDepth being supported.
|
|
41426
41535
|
*/
|
|
41427
41536
|
static defaultLogDepthBuffer: any;
|
|
41428
41537
|
/**
|
|
@@ -41507,48 +41616,48 @@ export class Scene {
|
|
|
41507
41616
|
readonly terrainProviderChanged: Event;
|
|
41508
41617
|
/**
|
|
41509
41618
|
* Gets the event that will be raised before the scene is updated or rendered. Subscribers to the event
|
|
41510
|
-
|
|
41619
|
+
receive the Scene instance as the first parameter and the current time as the second parameter.
|
|
41511
41620
|
*/
|
|
41512
41621
|
readonly preUpdate: Event;
|
|
41513
41622
|
/**
|
|
41514
41623
|
* Gets the event that will be raised immediately after the scene is updated and before the scene is rendered.
|
|
41515
|
-
|
|
41516
|
-
|
|
41624
|
+
Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
|
|
41625
|
+
parameter.
|
|
41517
41626
|
*/
|
|
41518
41627
|
readonly postUpdate: Event;
|
|
41519
41628
|
/**
|
|
41520
41629
|
* Gets the event that will be raised when an error is thrown inside the <code>render</code> function.
|
|
41521
|
-
|
|
41522
|
-
|
|
41523
|
-
|
|
41630
|
+
The Scene instance and the thrown error are the only two parameters passed to the event handler.
|
|
41631
|
+
By default, errors are not rethrown after this event is raised, but that can be changed by setting
|
|
41632
|
+
the <code>rethrowRenderErrors</code> property.
|
|
41524
41633
|
*/
|
|
41525
41634
|
readonly renderError: Event;
|
|
41526
41635
|
/**
|
|
41527
41636
|
* Gets the event that will be raised after the scene is updated and immediately before the scene is rendered.
|
|
41528
|
-
|
|
41529
|
-
|
|
41637
|
+
Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
|
|
41638
|
+
parameter.
|
|
41530
41639
|
*/
|
|
41531
41640
|
readonly preRender: Event;
|
|
41532
41641
|
/**
|
|
41533
41642
|
* Gets the event that will be raised immediately after the scene is rendered. Subscribers to the event
|
|
41534
|
-
|
|
41643
|
+
receive the Scene instance as the first parameter and the current time as the second parameter.
|
|
41535
41644
|
*/
|
|
41536
41645
|
readonly postRender: Event;
|
|
41537
41646
|
/**
|
|
41538
41647
|
* Gets the simulation time when the scene was last rendered. Returns undefined if the scene has not yet been
|
|
41539
|
-
|
|
41648
|
+
rendered.
|
|
41540
41649
|
*/
|
|
41541
41650
|
readonly lastRenderTime: JulianDate;
|
|
41542
41651
|
/**
|
|
41543
41652
|
* This property is for debugging only; it is not for production use.
|
|
41544
|
-
|
|
41545
|
-
|
|
41546
|
-
|
|
41547
|
-
|
|
41548
|
-
|
|
41549
|
-
|
|
41550
|
-
|
|
41551
|
-
|
|
41653
|
+
<p>
|
|
41654
|
+
When {@link Scene.debugShowFrustums} is <code>true</code>, this contains
|
|
41655
|
+
properties with statistics about the number of command execute per frustum.
|
|
41656
|
+
<code>totalCommands</code> is the total number of commands executed, ignoring
|
|
41657
|
+
overlap. <code>commandsInFrustums</code> is an array with the number of times
|
|
41658
|
+
commands are executed redundantly, e.g., how many commands overlap two or
|
|
41659
|
+
three frustums.
|
|
41660
|
+
</p>
|
|
41552
41661
|
*/
|
|
41553
41662
|
readonly debugFrustumStatistics: any;
|
|
41554
41663
|
/**
|
|
@@ -41557,8 +41666,8 @@ export class Scene {
|
|
|
41557
41666
|
readonly scene3DOnly: boolean;
|
|
41558
41667
|
/**
|
|
41559
41668
|
* Gets whether or not the scene has order independent translucency enabled.
|
|
41560
|
-
|
|
41561
|
-
|
|
41669
|
+
Note that this only reflects the original construction option, and there are
|
|
41670
|
+
other factors that could prevent OIT from functioning on a given system configuration.
|
|
41562
41671
|
*/
|
|
41563
41672
|
readonly orderIndependentTranslucency: boolean;
|
|
41564
41673
|
/**
|
|
@@ -41571,7 +41680,7 @@ export class Scene {
|
|
|
41571
41680
|
mode: SceneMode;
|
|
41572
41681
|
/**
|
|
41573
41682
|
* When <code>true</code>, splits the scene into two viewports with steroscopic views for the left and right eyes.
|
|
41574
|
-
|
|
41683
|
+
Used for cardboard and WebVR.
|
|
41575
41684
|
*/
|
|
41576
41685
|
useWebVR: boolean;
|
|
41577
41686
|
/**
|
|
@@ -41584,14 +41693,14 @@ export class Scene {
|
|
|
41584
41693
|
splitPosition: number;
|
|
41585
41694
|
/**
|
|
41586
41695
|
* The distance from the camera at which to disable the depth test of billboards, labels and points
|
|
41587
|
-
|
|
41588
|
-
|
|
41589
|
-
|
|
41696
|
+
to, for example, prevent clipping against terrain. When set to zero, the depth test should always
|
|
41697
|
+
be applied. When less than zero, the depth test should never be applied. Setting the disableDepthTestDistance
|
|
41698
|
+
property of a billboard, label or point will override this value.
|
|
41590
41699
|
*/
|
|
41591
41700
|
minimumDisableDepthTestDistance: number;
|
|
41592
41701
|
/**
|
|
41593
41702
|
* Whether or not to use a logarithmic depth buffer. Enabling this option will allow for less frustums in the multi-frustum,
|
|
41594
|
-
|
|
41703
|
+
increasing performance. This property relies on fragmentDepth being supported.
|
|
41595
41704
|
*/
|
|
41596
41705
|
logarithmicDepthBuffer: boolean;
|
|
41597
41706
|
/**
|
|
@@ -41626,30 +41735,30 @@ export class Scene {
|
|
|
41626
41735
|
getCompressedTextureFormatSupported(format: string): boolean;
|
|
41627
41736
|
/**
|
|
41628
41737
|
* Update and render the scene. It is usually not necessary to call this function
|
|
41629
|
-
|
|
41738
|
+
directly because {@link CesiumWidget} will do it automatically.
|
|
41630
41739
|
* @param [time] - The simulation time at which to render.
|
|
41631
41740
|
*/
|
|
41632
41741
|
render(time?: JulianDate): void;
|
|
41633
41742
|
/**
|
|
41634
41743
|
* Requests a new rendered frame when {@link Scene#requestRenderMode} is set to <code>true</code>.
|
|
41635
|
-
|
|
41744
|
+
The render rate will not exceed the {@link CesiumWidget#targetFrameRate}.
|
|
41636
41745
|
*/
|
|
41637
41746
|
requestRender(): void;
|
|
41638
41747
|
/**
|
|
41639
41748
|
* Returns an object with a `primitive` property that contains the first (top) primitive in the scene
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
|
|
41643
|
-
|
|
41644
|
-
|
|
41749
|
+
at a particular window coordinate or undefined if nothing is at the location. Other properties may
|
|
41750
|
+
potentially be set depending on the type of primitive and may be used to further identify the picked object.
|
|
41751
|
+
<p>
|
|
41752
|
+
When a feature of a 3D Tiles tileset is picked, <code>pick</code> returns a {@link Cesium3DTileFeature} object.
|
|
41753
|
+
</p>
|
|
41645
41754
|
* @example
|
|
41646
41755
|
* // On mouse over, color the feature yellow.
|
|
41647
|
-
|
|
41648
|
-
|
|
41649
|
-
|
|
41650
|
-
|
|
41651
|
-
|
|
41652
|
-
|
|
41756
|
+
handler.setInputAction(function(movement) {
|
|
41757
|
+
const feature = scene.pick(movement.endPosition);
|
|
41758
|
+
if (feature instanceof Cesium.Cesium3DTileFeature) {
|
|
41759
|
+
feature.color = Cesium.Color.YELLOW;
|
|
41760
|
+
}
|
|
41761
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41653
41762
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41654
41763
|
* @param [width = 3] - Width of the pick rectangle.
|
|
41655
41764
|
* @param [height = 3] - Height of the pick rectangle.
|
|
@@ -41658,15 +41767,15 @@ export class Scene {
|
|
|
41658
41767
|
pick(windowPosition: Cartesian2, width?: number, height?: number): any;
|
|
41659
41768
|
/**
|
|
41660
41769
|
* Returns a {@link VoxelCell} for the voxel sample rendered at a particular window coordinate,
|
|
41661
|
-
|
|
41770
|
+
or undefined if no voxel is rendered at that position.
|
|
41662
41771
|
* @example
|
|
41663
41772
|
* On left click, report the value of the "color" property at that voxel sample.
|
|
41664
|
-
|
|
41665
|
-
|
|
41666
|
-
|
|
41667
|
-
|
|
41668
|
-
|
|
41669
|
-
|
|
41773
|
+
handler.setInputAction(function(movement) {
|
|
41774
|
+
const voxelCell = scene.pickVoxel(movement.position);
|
|
41775
|
+
if (defined(voxelCell)) {
|
|
41776
|
+
console.log(voxelCell.getProperty("color"));
|
|
41777
|
+
}
|
|
41778
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
41670
41779
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41671
41780
|
* @param [width = 3] - Width of the pick rectangle.
|
|
41672
41781
|
* @param [height = 3] - Height of the pick rectangle.
|
|
@@ -41677,34 +41786,34 @@ export class Scene {
|
|
|
41677
41786
|
* Pick a metadata value at the given window position.
|
|
41678
41787
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41679
41788
|
* @param schemaId - The ID of the metadata schema to pick values
|
|
41680
|
-
|
|
41681
|
-
|
|
41789
|
+
from. If this is `undefined`, then it will pick the values from the object
|
|
41790
|
+
that match the given class- and property name, regardless of the schema ID.
|
|
41682
41791
|
* @param className - The name of the metadata class to pick
|
|
41683
|
-
|
|
41792
|
+
values from
|
|
41684
41793
|
* @param propertyName - The name of the metadata property to pick
|
|
41685
|
-
|
|
41794
|
+
values from
|
|
41686
41795
|
* @returns The metadata value, or `undefined` when
|
|
41687
|
-
|
|
41796
|
+
no matching metadata was found at the given position
|
|
41688
41797
|
*/
|
|
41689
41798
|
pickMetadata(windowPosition: Cartesian2, schemaId: string | undefined, className: string, propertyName: string): MetadataValue | undefined;
|
|
41690
41799
|
/**
|
|
41691
41800
|
* Pick the schema of the metadata of the object at the given position
|
|
41692
41801
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41693
41802
|
* @returns The metadata schema, or `undefined` if there is no object with
|
|
41694
|
-
|
|
41803
|
+
associated metadata at the given position.
|
|
41695
41804
|
*/
|
|
41696
41805
|
pickMetadataSchema(windowPosition: Cartesian2): MetadataSchema;
|
|
41697
41806
|
/**
|
|
41698
41807
|
* Returns the cartesian position reconstructed from the depth buffer and window position.
|
|
41699
|
-
|
|
41700
|
-
|
|
41701
|
-
|
|
41702
|
-
|
|
41703
|
-
|
|
41704
|
-
|
|
41705
|
-
|
|
41706
|
-
|
|
41707
|
-
|
|
41808
|
+
<p>
|
|
41809
|
+
The position reconstructed from the depth buffer in 2D may be slightly different from those
|
|
41810
|
+
reconstructed in 3D and Columbus view. This is caused by the difference in the distribution
|
|
41811
|
+
of depth values of perspective and orthographic projection.
|
|
41812
|
+
</p>
|
|
41813
|
+
<p>
|
|
41814
|
+
Set {@link Scene#pickTranslucentDepth} to <code>true</code> to include the depth of
|
|
41815
|
+
translucent primitives; otherwise, this essentially picks through translucent primitives.
|
|
41816
|
+
</p>
|
|
41708
41817
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41709
41818
|
* @param [result] - The object on which to restore the result.
|
|
41710
41819
|
* @returns The cartesian position.
|
|
@@ -41712,9 +41821,9 @@ export class Scene {
|
|
|
41712
41821
|
pickPosition(windowPosition: Cartesian2, result?: Cartesian3): Cartesian3;
|
|
41713
41822
|
/**
|
|
41714
41823
|
* Returns a list of objects, each containing a `primitive` property, for all primitives at
|
|
41715
|
-
|
|
41716
|
-
|
|
41717
|
-
|
|
41824
|
+
a particular window coordinate position. Other properties may also be set depending on the
|
|
41825
|
+
type of primitive and may be used to further identify the picked object. The primitives in
|
|
41826
|
+
the list are ordered by their visual order in the scene (front to back).
|
|
41718
41827
|
* @example
|
|
41719
41828
|
* const pickedObjects = scene.drillPick(new Cesium.Cartesian2(100.0, 200.0));
|
|
41720
41829
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
@@ -41726,16 +41835,16 @@ export class Scene {
|
|
|
41726
41835
|
drillPick(windowPosition: Cartesian2, limit?: number, width?: number, height?: number): any[];
|
|
41727
41836
|
/**
|
|
41728
41837
|
* Returns the height of scene geometry at the given cartographic position or <code>undefined</code> if there was no
|
|
41729
|
-
|
|
41730
|
-
|
|
41731
|
-
|
|
41732
|
-
|
|
41733
|
-
|
|
41734
|
-
|
|
41838
|
+
scene geometry to sample height from. The height of the input position is ignored. May be used to clamp objects to
|
|
41839
|
+
the globe, 3D Tiles, or primitives in the scene.
|
|
41840
|
+
<p>
|
|
41841
|
+
This function only samples height from globe tiles and 3D Tiles that are rendered in the current view. Samples height
|
|
41842
|
+
from all other primitives regardless of their visibility.
|
|
41843
|
+
</p>
|
|
41735
41844
|
* @example
|
|
41736
41845
|
* const position = new Cesium.Cartographic(-1.31968, 0.698874);
|
|
41737
|
-
|
|
41738
|
-
|
|
41846
|
+
const height = viewer.scene.sampleHeight(position);
|
|
41847
|
+
console.log(height);
|
|
41739
41848
|
* @param position - The cartographic position to sample height from.
|
|
41740
41849
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
41741
41850
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41744,16 +41853,16 @@ export class Scene {
|
|
|
41744
41853
|
sampleHeight(position: Cartographic, objectsToExclude?: object[], width?: number): number;
|
|
41745
41854
|
/**
|
|
41746
41855
|
* Clamps the given cartesian position to the scene geometry along the geodetic surface normal. Returns the
|
|
41747
|
-
|
|
41748
|
-
|
|
41749
|
-
|
|
41750
|
-
|
|
41751
|
-
|
|
41752
|
-
|
|
41856
|
+
clamped position or <code>undefined</code> if there was no scene geometry to clamp to. May be used to clamp
|
|
41857
|
+
objects to the globe, 3D Tiles, or primitives in the scene.
|
|
41858
|
+
<p>
|
|
41859
|
+
This function only clamps to globe tiles and 3D Tiles that are rendered in the current view. Clamps to
|
|
41860
|
+
all other primitives regardless of their visibility.
|
|
41861
|
+
</p>
|
|
41753
41862
|
* @example
|
|
41754
41863
|
* // Clamp an entity to the underlying scene geometry
|
|
41755
|
-
|
|
41756
|
-
|
|
41864
|
+
const position = entity.position.getValue(Cesium.JulianDate.now());
|
|
41865
|
+
entity.position = viewer.scene.clampToHeight(position);
|
|
41757
41866
|
* @param cartesian - The cartesian position.
|
|
41758
41867
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
41759
41868
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41763,20 +41872,20 @@ export class Scene {
|
|
|
41763
41872
|
clampToHeight(cartesian: Cartesian3, objectsToExclude?: object[], width?: number, result?: Cartesian3): Cartesian3;
|
|
41764
41873
|
/**
|
|
41765
41874
|
* Initiates an asynchronous {@link Scene#sampleHeight} query for an array of {@link Cartographic} positions
|
|
41766
|
-
|
|
41767
|
-
|
|
41768
|
-
|
|
41769
|
-
|
|
41875
|
+
using the maximum level of detail for 3D Tilesets in the scene. The height of the input positions is ignored.
|
|
41876
|
+
Returns a promise that is resolved when the query completes. Each point height is modified in place.
|
|
41877
|
+
If a height cannot be determined because no geometry can be sampled at that location, or another error occurs,
|
|
41878
|
+
the height is set to undefined.
|
|
41770
41879
|
* @example
|
|
41771
41880
|
* const positions = [
|
|
41772
|
-
|
|
41773
|
-
|
|
41774
|
-
|
|
41775
|
-
|
|
41776
|
-
|
|
41777
|
-
|
|
41778
|
-
|
|
41779
|
-
|
|
41881
|
+
new Cesium.Cartographic(-1.31968, 0.69887),
|
|
41882
|
+
new Cesium.Cartographic(-1.10489, 0.83923)
|
|
41883
|
+
];
|
|
41884
|
+
const promise = viewer.scene.sampleHeightMostDetailed(positions);
|
|
41885
|
+
promise.then(function(updatedPosition) {
|
|
41886
|
+
// positions[0].height and positions[1].height have been updated.
|
|
41887
|
+
// updatedPositions is just a reference to positions.
|
|
41888
|
+
}
|
|
41780
41889
|
* @param positions - The cartographic positions to update with sampled heights.
|
|
41781
41890
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
41782
41891
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41785,19 +41894,19 @@ export class Scene {
|
|
|
41785
41894
|
sampleHeightMostDetailed(positions: Cartographic[], objectsToExclude?: object[], width?: number): Promise<Cartographic[]>;
|
|
41786
41895
|
/**
|
|
41787
41896
|
* Initiates an asynchronous {@link Scene#clampToHeight} query for an array of {@link Cartesian3} positions
|
|
41788
|
-
|
|
41789
|
-
|
|
41790
|
-
|
|
41897
|
+
using the maximum level of detail for 3D Tilesets in the scene. Returns a promise that is resolved when
|
|
41898
|
+
the query completes. Each position is modified in place. If a position cannot be clamped because no geometry
|
|
41899
|
+
can be sampled at that location, or another error occurs, the element in the array is set to undefined.
|
|
41791
41900
|
* @example
|
|
41792
41901
|
* const cartesians = [
|
|
41793
|
-
|
|
41794
|
-
|
|
41795
|
-
|
|
41796
|
-
|
|
41797
|
-
|
|
41798
|
-
|
|
41799
|
-
|
|
41800
|
-
|
|
41902
|
+
entities[0].position.getValue(Cesium.JulianDate.now()),
|
|
41903
|
+
entities[1].position.getValue(Cesium.JulianDate.now())
|
|
41904
|
+
];
|
|
41905
|
+
const promise = viewer.scene.clampToHeightMostDetailed(cartesians);
|
|
41906
|
+
promise.then(function(updatedCartesians) {
|
|
41907
|
+
entities[0].position = updatedCartesians[0];
|
|
41908
|
+
entities[1].position = updatedCartesians[1];
|
|
41909
|
+
}
|
|
41801
41910
|
* @param cartesians - The cartesian positions to update with clamped positions.
|
|
41802
41911
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
41803
41912
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41806,15 +41915,15 @@ export class Scene {
|
|
|
41806
41915
|
clampToHeightMostDetailed(cartesians: Cartesian3[], objectsToExclude?: object[], width?: number): Promise<Cartesian3[]>;
|
|
41807
41916
|
/**
|
|
41808
41917
|
* Transforms a position in cartesian coordinates to canvas coordinates. This is commonly used to place an
|
|
41809
|
-
|
|
41918
|
+
HTML element at the same screen position as an object in the scene.
|
|
41810
41919
|
* @example
|
|
41811
41920
|
* // Output the canvas position of longitude/latitude (0, 0) every time the mouse moves.
|
|
41812
|
-
|
|
41813
|
-
|
|
41814
|
-
|
|
41815
|
-
|
|
41816
|
-
|
|
41817
|
-
|
|
41921
|
+
const scene = widget.scene;
|
|
41922
|
+
const position = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
41923
|
+
const handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
|
41924
|
+
handler.setInputAction(function(movement) {
|
|
41925
|
+
console.log(scene.cartesianToCanvasCoordinates(position));
|
|
41926
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41818
41927
|
* @param position - The position in cartesian coordinates.
|
|
41819
41928
|
* @param [result] - An optional object to return the input position transformed to canvas coordinates.
|
|
41820
41929
|
* @returns The modified result parameter or a new Cartesian2 instance if one was not provided. This may be <code>undefined</code> if the input position is near the center of the ellipsoid.
|
|
@@ -41843,34 +41952,34 @@ export class Scene {
|
|
|
41843
41952
|
* Update the terrain providing surface geometry for the globe.
|
|
41844
41953
|
* @example
|
|
41845
41954
|
* // Use Cesium World Terrain
|
|
41846
|
-
|
|
41955
|
+
scene.setTerrain(Cesium.Terrain.fromWorldTerrain());
|
|
41847
41956
|
* @example
|
|
41848
41957
|
* // Use a custom terrain provider
|
|
41849
|
-
|
|
41850
|
-
|
|
41851
|
-
|
|
41852
|
-
|
|
41853
|
-
|
|
41854
|
-
|
|
41958
|
+
const terrain = new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl("https://myTestTerrain.com"));
|
|
41959
|
+
scene.setTerrain(terrain);
|
|
41960
|
+
|
|
41961
|
+
terrain.errorEvent.addEventListener(error => {
|
|
41962
|
+
alert(`Encountered an error while creating terrain! ${error}`);
|
|
41963
|
+
});
|
|
41855
41964
|
* @param terrain - The terrain provider async helper
|
|
41856
41965
|
* @returns terrain The terrain provider async helper
|
|
41857
41966
|
*/
|
|
41858
41967
|
setTerrain(terrain: Terrain): Terrain;
|
|
41859
41968
|
/**
|
|
41860
41969
|
* Returns true if this object was destroyed; otherwise, false.
|
|
41861
|
-
|
|
41862
|
-
|
|
41863
|
-
|
|
41970
|
+
<br /><br />
|
|
41971
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
41972
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
41864
41973
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
41865
41974
|
*/
|
|
41866
41975
|
isDestroyed(): boolean;
|
|
41867
41976
|
/**
|
|
41868
41977
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
41869
|
-
|
|
41870
|
-
|
|
41871
|
-
|
|
41872
|
-
|
|
41873
|
-
|
|
41978
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
41979
|
+
<br /><br />
|
|
41980
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
41981
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
41982
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
41874
41983
|
* @example
|
|
41875
41984
|
* scene = scene && scene.destroy();
|
|
41876
41985
|
*/
|
|
@@ -41879,11 +41988,11 @@ export class Scene {
|
|
|
41879
41988
|
|
|
41880
41989
|
/**
|
|
41881
41990
|
* Determine how translucent surfaces will be handled.
|
|
41882
|
-
|
|
41883
|
-
|
|
41884
|
-
|
|
41885
|
-
|
|
41886
|
-
|
|
41991
|
+
|
|
41992
|
+
When OIT is enabled, then this will delegate to OIT.executeCommands.
|
|
41993
|
+
Otherwise, it will just be executeTranslucentCommandsBackToFront
|
|
41994
|
+
for render passes, or executeTranslucentCommandsFrontToBack for
|
|
41995
|
+
other passes.
|
|
41887
41996
|
* @param scene - The scene.
|
|
41888
41997
|
* @returns A function to execute translucent commands.
|
|
41889
41998
|
*/
|
|
@@ -41958,18 +42067,18 @@ export class ScreenSpaceCameraController {
|
|
|
41958
42067
|
constructor(scene: Scene);
|
|
41959
42068
|
/**
|
|
41960
42069
|
* If true, inputs are allowed conditionally with the flags enableTranslate, enableZoom,
|
|
41961
|
-
|
|
41962
|
-
|
|
41963
|
-
|
|
41964
|
-
|
|
41965
|
-
|
|
41966
|
-
|
|
41967
|
-
|
|
42070
|
+
enableRotate, enableTilt, and enableLook. If false, all inputs are disabled.
|
|
42071
|
+
|
|
42072
|
+
NOTE: This setting is for temporary use cases, such as camera flights and
|
|
42073
|
+
drag-selection of regions (see Picking demo). It is typically set to false at the
|
|
42074
|
+
start of such events, and set true on completion. To keep inputs disabled
|
|
42075
|
+
past the end of camera flights, you must use the other booleans (enableTranslate,
|
|
42076
|
+
enableZoom, enableRotate, enableTilt, and enableLook).
|
|
41968
42077
|
*/
|
|
41969
42078
|
enableInputs: boolean;
|
|
41970
42079
|
/**
|
|
41971
42080
|
* If true, allows the user to pan around the map. If false, the camera stays locked at the current position.
|
|
41972
|
-
|
|
42081
|
+
This flag only applies in 2D and Columbus view modes.
|
|
41973
42082
|
*/
|
|
41974
42083
|
enableTranslate: boolean;
|
|
41975
42084
|
/**
|
|
@@ -41978,41 +42087,41 @@ export class ScreenSpaceCameraController {
|
|
|
41978
42087
|
enableZoom: boolean;
|
|
41979
42088
|
/**
|
|
41980
42089
|
* If true, allows the user to rotate the world which translates the user's position.
|
|
41981
|
-
|
|
42090
|
+
This flag only applies in 2D and 3D.
|
|
41982
42091
|
*/
|
|
41983
42092
|
enableRotate: boolean;
|
|
41984
42093
|
/**
|
|
41985
42094
|
* If true, allows the user to tilt the camera. If false, the camera is locked to the current heading.
|
|
41986
|
-
|
|
42095
|
+
This flag only applies in 3D and Columbus view.
|
|
41987
42096
|
*/
|
|
41988
42097
|
enableTilt: boolean;
|
|
41989
42098
|
/**
|
|
41990
42099
|
* If true, allows the user to use free-look. If false, the camera view direction can only be changed through translating
|
|
41991
|
-
|
|
42100
|
+
or rotating. This flag only applies in 3D and Columbus view modes.
|
|
41992
42101
|
*/
|
|
41993
42102
|
enableLook: boolean;
|
|
41994
42103
|
/**
|
|
41995
42104
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
41996
|
-
|
|
41997
|
-
|
|
42105
|
+
the camera will continue to spin because of inertia.
|
|
42106
|
+
With value of zero, the camera will have no inertia.
|
|
41998
42107
|
*/
|
|
41999
42108
|
inertiaSpin: number;
|
|
42000
42109
|
/**
|
|
42001
42110
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
42002
|
-
|
|
42003
|
-
|
|
42111
|
+
the camera will continue to translate because of inertia.
|
|
42112
|
+
With value of zero, the camera will have no inertia.
|
|
42004
42113
|
*/
|
|
42005
42114
|
inertiaTranslate: number;
|
|
42006
42115
|
/**
|
|
42007
42116
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
42008
|
-
|
|
42009
|
-
|
|
42117
|
+
the camera will continue to zoom because of inertia.
|
|
42118
|
+
With value of zero, the camera will have no inertia.
|
|
42010
42119
|
*/
|
|
42011
42120
|
inertiaZoom: number;
|
|
42012
42121
|
/**
|
|
42013
42122
|
* A parameter in the range <code>[0, 1)</code> used to limit the range
|
|
42014
|
-
|
|
42015
|
-
|
|
42123
|
+
of various user inputs to a percentage of the window width/height per animation frame.
|
|
42124
|
+
This helps keep the camera under control in low-frame-rate situations.
|
|
42016
42125
|
*/
|
|
42017
42126
|
maximumMovementRatio: number;
|
|
42018
42127
|
/**
|
|
@@ -42033,47 +42142,47 @@ export class ScreenSpaceCameraController {
|
|
|
42033
42142
|
zoomFactor: number;
|
|
42034
42143
|
/**
|
|
42035
42144
|
* The input that allows the user to pan around the map. This only applies in 2D and Columbus view modes.
|
|
42036
|
-
|
|
42037
|
-
|
|
42038
|
-
|
|
42039
|
-
|
|
42040
|
-
|
|
42145
|
+
<p>
|
|
42146
|
+
The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42147
|
+
and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42148
|
+
or an array of any of the preceding.
|
|
42149
|
+
</p>
|
|
42041
42150
|
*/
|
|
42042
42151
|
translateEventTypes: CameraEventType | any[] | undefined;
|
|
42043
42152
|
/**
|
|
42044
42153
|
* The input that allows the user to zoom in/out.
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42049
|
-
|
|
42154
|
+
<p>
|
|
42155
|
+
The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42156
|
+
and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42157
|
+
or an array of any of the preceding.
|
|
42158
|
+
</p>
|
|
42050
42159
|
*/
|
|
42051
42160
|
zoomEventTypes: CameraEventType | any[] | undefined;
|
|
42052
42161
|
/**
|
|
42053
42162
|
* The input that allows the user to rotate around the globe or another object. This only applies in 3D and Columbus view modes.
|
|
42054
|
-
|
|
42055
|
-
|
|
42056
|
-
|
|
42057
|
-
|
|
42058
|
-
|
|
42163
|
+
<p>
|
|
42164
|
+
The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42165
|
+
and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42166
|
+
or an array of any of the preceding.
|
|
42167
|
+
</p>
|
|
42059
42168
|
*/
|
|
42060
42169
|
rotateEventTypes: CameraEventType | any[] | undefined;
|
|
42061
42170
|
/**
|
|
42062
42171
|
* The input that allows the user to tilt in 3D and Columbus view or twist in 2D.
|
|
42063
|
-
|
|
42064
|
-
|
|
42065
|
-
|
|
42066
|
-
|
|
42067
|
-
|
|
42172
|
+
<p>
|
|
42173
|
+
The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42174
|
+
and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42175
|
+
or an array of any of the preceding.
|
|
42176
|
+
</p>
|
|
42068
42177
|
*/
|
|
42069
42178
|
tiltEventTypes: CameraEventType | any[] | undefined;
|
|
42070
42179
|
/**
|
|
42071
42180
|
* The input that allows the user to change the direction the camera is viewing. This only applies in 3D and Columbus view modes.
|
|
42072
|
-
|
|
42073
|
-
|
|
42074
|
-
|
|
42075
|
-
|
|
42076
|
-
|
|
42181
|
+
<p>
|
|
42182
|
+
The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42183
|
+
and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42184
|
+
or an array of any of the preceding.
|
|
42185
|
+
</p>
|
|
42077
42186
|
*/
|
|
42078
42187
|
lookEventTypes: CameraEventType | any[] | undefined;
|
|
42079
42188
|
/**
|
|
@@ -42090,7 +42199,7 @@ export class ScreenSpaceCameraController {
|
|
|
42090
42199
|
minimumCollisionTerrainHeight: number;
|
|
42091
42200
|
/**
|
|
42092
42201
|
* The minimum height the camera must be before switching from rotating a track ball to
|
|
42093
|
-
|
|
42202
|
+
free look when clicks originate on the sky or in space. Defaults to ellipsoid.minimumRadius * 1.175 when another ellipsoid than WGS84 is used.
|
|
42094
42203
|
*/
|
|
42095
42204
|
minimumTrackBallHeight: number;
|
|
42096
42205
|
/**
|
|
@@ -42101,23 +42210,23 @@ export class ScreenSpaceCameraController {
|
|
|
42101
42210
|
* The angle, relative to the ellipsoid normal, restricting the maximum amount that the user can tilt the camera. If <code>undefined</code>, the angle of the camera tilt is unrestricted.
|
|
42102
42211
|
* @example
|
|
42103
42212
|
* // Prevent the camera from tilting below the ellipsoid surface
|
|
42104
|
-
|
|
42213
|
+
viewer.scene.screenSpaceCameraController.maximumTiltAngle = Math.PI / 2.0;
|
|
42105
42214
|
*/
|
|
42106
42215
|
maximumTiltAngle: number | undefined;
|
|
42107
42216
|
/**
|
|
42108
42217
|
* Returns true if this object was destroyed; otherwise, false.
|
|
42109
|
-
|
|
42110
|
-
|
|
42111
|
-
|
|
42218
|
+
<br /><br />
|
|
42219
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
42220
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
42112
42221
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
42113
42222
|
*/
|
|
42114
42223
|
isDestroyed(): boolean;
|
|
42115
42224
|
/**
|
|
42116
42225
|
* Removes mouse listeners held by this object.
|
|
42117
|
-
|
|
42118
|
-
|
|
42119
|
-
|
|
42120
|
-
|
|
42226
|
+
<br /><br />
|
|
42227
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
42228
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
42229
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
42121
42230
|
* @example
|
|
42122
42231
|
* controller = controller && controller.destroy();
|
|
42123
42232
|
*/
|
|
@@ -42144,13 +42253,13 @@ export enum SensorVolumePortionToDisplay {
|
|
|
42144
42253
|
|
|
42145
42254
|
/**
|
|
42146
42255
|
* <div class="notice">
|
|
42147
|
-
|
|
42148
|
-
|
|
42149
|
-
|
|
42150
|
-
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42256
|
+
Use {@link Viewer#shadowMap} to get the scene's shadow map. Do not construct this directly.
|
|
42257
|
+
</div>
|
|
42258
|
+
|
|
42259
|
+
<p>
|
|
42260
|
+
The normalOffset bias pushes the shadows forward slightly, and may be disabled
|
|
42261
|
+
for applications that require ultra precise shadows.
|
|
42262
|
+
</p>
|
|
42154
42263
|
*/
|
|
42155
42264
|
export class ShadowMap {
|
|
42156
42265
|
constructor();
|
|
@@ -43744,6 +43853,29 @@ export class VoxelCell {
|
|
|
43744
43853
|
getProperty(name: string): any;
|
|
43745
43854
|
}
|
|
43746
43855
|
|
|
43856
|
+
/**
|
|
43857
|
+
* <div class="notice">
|
|
43858
|
+
To construct a VoxelContent, call {@link VoxelContent.fromMetadataArray} or {@link VoxelContent.fromGltf}. Do not call the constructor directly.
|
|
43859
|
+
</div>
|
|
43860
|
+
An object representing voxel content for a {@link Cesium3DTilesVoxelProvider}.
|
|
43861
|
+
*/
|
|
43862
|
+
export class VoxelContent {
|
|
43863
|
+
constructor();
|
|
43864
|
+
/**
|
|
43865
|
+
* Constructs a VoxelContent from an array of metadata.
|
|
43866
|
+
* @param metadata - The metadata to use for this voxel content.
|
|
43867
|
+
* @returns A VoxelContent containing the specified metadata.
|
|
43868
|
+
*/
|
|
43869
|
+
static fromMetadataArray(metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[]): VoxelContent;
|
|
43870
|
+
}
|
|
43871
|
+
|
|
43872
|
+
/**
|
|
43873
|
+
* The metadata for this voxel content.
|
|
43874
|
+
The metadata is an array of typed arrays, one for each field.
|
|
43875
|
+
The data for one field is a flattened 3D array ordered by X, then Y, then Z.
|
|
43876
|
+
*/
|
|
43877
|
+
export const metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[];
|
|
43878
|
+
|
|
43747
43879
|
/**
|
|
43748
43880
|
* A primitive that renders voxel data from a {@link VoxelProvider}.
|
|
43749
43881
|
* @param [options] - Object with the following properties:
|
|
@@ -43751,6 +43883,7 @@ export class VoxelCell {
|
|
|
43751
43883
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The model matrix used to transform the primitive.
|
|
43752
43884
|
* @param [options.customShader] - The custom shader used to style the primitive.
|
|
43753
43885
|
* @param [options.clock] - The clock used to control time dynamic behavior.
|
|
43886
|
+
* @param [options.calculateStatistics] - Generate statistics for performance profile.
|
|
43754
43887
|
*/
|
|
43755
43888
|
export class VoxelPrimitive {
|
|
43756
43889
|
constructor(options?: {
|
|
@@ -43758,11 +43891,8 @@ export class VoxelPrimitive {
|
|
|
43758
43891
|
modelMatrix?: Matrix4;
|
|
43759
43892
|
customShader?: CustomShader;
|
|
43760
43893
|
clock?: Clock;
|
|
43894
|
+
calculateStatistics?: boolean;
|
|
43761
43895
|
});
|
|
43762
|
-
/**
|
|
43763
|
-
* The number of levels of detail containing available tiles in the tileset.
|
|
43764
|
-
*/
|
|
43765
|
-
readonly availableLevels: number | undefined;
|
|
43766
43896
|
/**
|
|
43767
43897
|
* The event fired to indicate that a tile's content was loaded.
|
|
43768
43898
|
<p>
|
|
@@ -43873,9 +44003,23 @@ export class VoxelPrimitive {
|
|
|
43873
44003
|
*/
|
|
43874
44004
|
readonly shape: VoxelShapeType;
|
|
43875
44005
|
/**
|
|
43876
|
-
* Gets the voxel
|
|
44006
|
+
* Gets the dimensions of each voxel tile, in z-up orientation.
|
|
44007
|
+
Does not include padding.
|
|
43877
44008
|
*/
|
|
43878
44009
|
readonly dimensions: Cartesian3;
|
|
44010
|
+
/**
|
|
44011
|
+
* Gets the dimensions of one tile of the input voxel data, in the input orientation.
|
|
44012
|
+
Includes padding.
|
|
44013
|
+
*/
|
|
44014
|
+
readonly inputDimensions: Cartesian3;
|
|
44015
|
+
/**
|
|
44016
|
+
* Gets the padding before the voxel data.
|
|
44017
|
+
*/
|
|
44018
|
+
readonly paddingBefore: Cartesian3;
|
|
44019
|
+
/**
|
|
44020
|
+
* Gets the padding after the voxel data.
|
|
44021
|
+
*/
|
|
44022
|
+
readonly paddingAfter: Cartesian3;
|
|
43879
44023
|
/**
|
|
43880
44024
|
* Gets the minimum value per channel of the voxel data.
|
|
43881
44025
|
*/
|
|
@@ -43977,91 +44121,80 @@ This type describes an interface and is not intended to be instantiated directly
|
|
|
43977
44121
|
export class VoxelProvider {
|
|
43978
44122
|
constructor();
|
|
43979
44123
|
/**
|
|
43980
|
-
* A transform from local space to global space.
|
|
44124
|
+
* A transform from local space to global space.
|
|
43981
44125
|
*/
|
|
43982
|
-
readonly globalTransform: Matrix4
|
|
44126
|
+
readonly globalTransform: Matrix4;
|
|
43983
44127
|
/**
|
|
43984
|
-
* A transform from shape space to local space.
|
|
44128
|
+
* A transform from shape space to local space.
|
|
43985
44129
|
*/
|
|
43986
|
-
readonly shapeTransform: Matrix4
|
|
44130
|
+
readonly shapeTransform: Matrix4;
|
|
43987
44131
|
/**
|
|
43988
44132
|
* Gets the {@link VoxelShapeType}
|
|
43989
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43990
44133
|
*/
|
|
43991
44134
|
readonly shape: VoxelShapeType;
|
|
43992
44135
|
/**
|
|
43993
44136
|
* Gets the minimum bounds.
|
|
43994
44137
|
If undefined, the shape's default minimum bounds will be used instead.
|
|
43995
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43996
44138
|
*/
|
|
43997
44139
|
readonly minBounds: Cartesian3 | undefined;
|
|
43998
44140
|
/**
|
|
43999
44141
|
* Gets the maximum bounds.
|
|
44000
44142
|
If undefined, the shape's default maximum bounds will be used instead.
|
|
44001
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44002
44143
|
*/
|
|
44003
44144
|
readonly maxBounds: Cartesian3 | undefined;
|
|
44004
44145
|
/**
|
|
44005
44146
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
44006
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44007
44147
|
*/
|
|
44008
44148
|
readonly dimensions: Cartesian3;
|
|
44009
44149
|
/**
|
|
44010
44150
|
* Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
44011
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44012
44151
|
*/
|
|
44013
|
-
readonly paddingBefore: Cartesian3
|
|
44152
|
+
readonly paddingBefore: Cartesian3;
|
|
44014
44153
|
/**
|
|
44015
44154
|
* Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
44016
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44017
44155
|
*/
|
|
44018
|
-
readonly paddingAfter: Cartesian3
|
|
44156
|
+
readonly paddingAfter: Cartesian3;
|
|
44019
44157
|
/**
|
|
44020
44158
|
* Gets the metadata names.
|
|
44021
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44022
44159
|
*/
|
|
44023
44160
|
readonly names: string[];
|
|
44024
44161
|
/**
|
|
44025
44162
|
* Gets the metadata types.
|
|
44026
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44027
44163
|
*/
|
|
44028
44164
|
readonly types: MetadataType[];
|
|
44029
44165
|
/**
|
|
44030
44166
|
* Gets the metadata component types.
|
|
44031
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44032
44167
|
*/
|
|
44033
44168
|
readonly componentTypes: MetadataComponentType[];
|
|
44034
44169
|
/**
|
|
44035
44170
|
* Gets the metadata minimum values.
|
|
44036
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44037
44171
|
*/
|
|
44038
44172
|
readonly minimumValues: number[][] | undefined;
|
|
44039
44173
|
/**
|
|
44040
44174
|
* Gets the metadata maximum values.
|
|
44041
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44042
44175
|
*/
|
|
44043
44176
|
readonly maximumValues: number[][] | undefined;
|
|
44044
44177
|
/**
|
|
44045
|
-
* The maximum number of tiles that exist for this provider.
|
|
44046
|
-
This
|
|
44178
|
+
* The maximum number of tiles that exist for this provider.
|
|
44179
|
+
This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
|
|
44180
|
+
If this value is not known it can be undefined.
|
|
44047
44181
|
*/
|
|
44048
44182
|
readonly maximumTileCount: number | undefined;
|
|
44049
44183
|
/**
|
|
44050
|
-
* Requests the data for a given tile.
|
|
44051
|
-
This function should not be called before {@link VoxelProvider#ready} returns true.
|
|
44184
|
+
* Requests the data for a given tile.
|
|
44052
44185
|
* @param [options] - Object with the following properties:
|
|
44053
44186
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
44054
44187
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
44055
44188
|
* @param [options.tileY = 0] - The tile's Y coordinate.
|
|
44056
44189
|
* @param [options.tileZ = 0] - The tile's Z coordinate.
|
|
44057
|
-
* @returns A promise to
|
|
44190
|
+
* @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
|
|
44058
44191
|
*/
|
|
44059
44192
|
requestData(options?: {
|
|
44060
44193
|
tileLevel?: number;
|
|
44061
44194
|
tileX?: number;
|
|
44062
44195
|
tileY?: number;
|
|
44063
44196
|
tileZ?: number;
|
|
44064
|
-
}): Promise<
|
|
44197
|
+
}): Promise<VoxelContent> | undefined;
|
|
44065
44198
|
}
|
|
44066
44199
|
|
|
44067
44200
|
/**
|
|
@@ -44069,19 +44202,6 @@ export class VoxelProvider {
|
|
|
44069
44202
|
*/
|
|
44070
44203
|
export const availableLevels: number | undefined;
|
|
44071
44204
|
|
|
44072
|
-
export const shaderUniforms: {
|
|
44073
|
-
[key: string]: any;
|
|
44074
|
-
};
|
|
44075
|
-
|
|
44076
|
-
export const shaderDefines: {
|
|
44077
|
-
[key: string]: any;
|
|
44078
|
-
};
|
|
44079
|
-
|
|
44080
|
-
/**
|
|
44081
|
-
* The maximum number of intersections against the shape for any ray direction.
|
|
44082
|
-
*/
|
|
44083
|
-
export const shaderMaximumIntersectionsLength: number;
|
|
44084
|
-
|
|
44085
44205
|
/**
|
|
44086
44206
|
* An enum of voxel shapes. The shape controls how the voxel grid is mapped to 3D space.
|
|
44087
44207
|
*/
|
|
@@ -44118,31 +44238,31 @@ export namespace WebMapServiceImageryProvider {
|
|
|
44118
44238
|
* @property [parameters = WebMapServiceImageryProvider.DefaultParameters] - Additional parameters to pass to the WMS server in the GetMap URL.
|
|
44119
44239
|
* @property [getFeatureInfoParameters = WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] - Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
|
|
44120
44240
|
* @property [enablePickFeatures = true] - If true, {@link WebMapServiceImageryProvider#pickFeatures} will invoke
|
|
44121
|
-
|
|
44122
|
-
|
|
44123
|
-
|
|
44124
|
-
|
|
44125
|
-
|
|
44241
|
+
the GetFeatureInfo operation on the WMS server and return the features included in the response. If false,
|
|
44242
|
+
{@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable features)
|
|
44243
|
+
without communicating with the server. Set this property to false if you know your WMS server does not support
|
|
44244
|
+
GetFeatureInfo or if you don't want this provider's features to be pickable. Note that this can be dynamically
|
|
44245
|
+
overridden by modifying the WebMapServiceImageryProvider#enablePickFeatures property.
|
|
44126
44246
|
* @property [getFeatureInfoFormats = WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] - The formats
|
|
44127
|
-
|
|
44247
|
+
in which to try WMS GetFeatureInfo requests.
|
|
44128
44248
|
* @property [rectangle = Rectangle.MAX_VALUE] - The rectangle of the layer.
|
|
44129
44249
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme to use to divide the world into tiles.
|
|
44130
44250
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
44131
|
-
|
|
44132
|
-
|
|
44251
|
+
this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
44252
|
+
parameter is specified, the WGS84 ellipsoid is used.
|
|
44133
44253
|
* @property [tileWidth = 256] - The width of each tile in pixels.
|
|
44134
44254
|
* @property [tileHeight = 256] - The height of each tile in pixels.
|
|
44135
44255
|
* @property [minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider. Take care when
|
|
44136
|
-
|
|
44137
|
-
|
|
44256
|
+
specifying this that the number of tiles at the minimum level is small, such as four or less. A larger number is
|
|
44257
|
+
likely to result in rendering problems.
|
|
44138
44258
|
* @property [maximumLevel] - The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
|
|
44139
|
-
|
|
44259
|
+
If not specified, there is no limit.
|
|
44140
44260
|
* @property [crs] - CRS specification, for use with WMS specification >= 1.3.0.
|
|
44141
44261
|
* @property [srs] - SRS specification, for use with WMS specification 1.1.0 or 1.1.1
|
|
44142
44262
|
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
44143
44263
|
* @property [subdomains = 'abc'] - The subdomains to use for the <code>{s}</code> placeholder in the URL template.
|
|
44144
|
-
|
|
44145
|
-
|
|
44264
|
+
If this parameter is a single string, each character in the string is a subdomain. If it is
|
|
44265
|
+
an array, each element in the array is a subdomain.
|
|
44146
44266
|
* @property [clock] - A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
|
|
44147
44267
|
* @property [times] - TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.
|
|
44148
44268
|
* @property [getFeatureInfoUrl] - The getFeatureInfo URL of the WMS service. If the property is not defined then we use the property value of url.
|
|
@@ -44175,12 +44295,12 @@ export namespace WebMapServiceImageryProvider {
|
|
|
44175
44295
|
* Provides tiled imagery hosted by a Web Map Service (WMS) server.
|
|
44176
44296
|
* @example
|
|
44177
44297
|
* const provider = new Cesium.WebMapServiceImageryProvider({
|
|
44178
|
-
|
|
44179
|
-
|
|
44180
|
-
|
|
44181
|
-
|
|
44182
|
-
|
|
44183
|
-
|
|
44298
|
+
url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
|
|
44299
|
+
layers : '0',
|
|
44300
|
+
proxy: new Cesium.DefaultProxy('/proxy/')
|
|
44301
|
+
});
|
|
44302
|
+
const imageryLayer = new Cesium.ImageryLayer(provider);
|
|
44303
|
+
viewer.imageryLayers.add(imageryLayer);
|
|
44184
44304
|
* @param options - Object describing initialization options
|
|
44185
44305
|
*/
|
|
44186
44306
|
export class WebMapServiceImageryProvider {
|
|
@@ -44223,35 +44343,35 @@ export class WebMapServiceImageryProvider {
|
|
|
44223
44343
|
readonly rectangle: Rectangle;
|
|
44224
44344
|
/**
|
|
44225
44345
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
44226
|
-
|
|
44227
|
-
|
|
44346
|
+
for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
44347
|
+
returns undefined, no tiles are filtered.
|
|
44228
44348
|
*/
|
|
44229
44349
|
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
44230
44350
|
/**
|
|
44231
44351
|
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
44232
|
-
|
|
44233
|
-
|
|
44352
|
+
to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
44353
|
+
are passed an instance of {@link TileProviderError}.
|
|
44234
44354
|
*/
|
|
44235
44355
|
readonly errorEvent: Event;
|
|
44236
44356
|
/**
|
|
44237
44357
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
44238
|
-
|
|
44358
|
+
the source of the imagery.
|
|
44239
44359
|
*/
|
|
44240
44360
|
readonly credit: Credit;
|
|
44241
44361
|
/**
|
|
44242
44362
|
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
44243
|
-
|
|
44244
|
-
|
|
44245
|
-
|
|
44246
|
-
|
|
44363
|
+
include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
44364
|
+
be ignored. If this property is true, any images without an alpha channel will be treated
|
|
44365
|
+
as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
44366
|
+
and texture upload time are reduced.
|
|
44247
44367
|
*/
|
|
44248
44368
|
readonly hasAlphaChannel: boolean;
|
|
44249
44369
|
/**
|
|
44250
44370
|
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link WebMapServiceImageryProvider#pickFeatures} will
|
|
44251
|
-
|
|
44252
|
-
|
|
44253
|
-
|
|
44254
|
-
|
|
44371
|
+
invoke the <code>GetFeatureInfo</code> service on the WMS server and attempt to interpret the features included in the response. If false,
|
|
44372
|
+
{@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
|
|
44373
|
+
features) without communicating with the server. Set this property to false if you know your data
|
|
44374
|
+
source does not support picking features or if you don't want this provider's features to be pickable.
|
|
44255
44375
|
*/
|
|
44256
44376
|
enablePickFeatures: boolean;
|
|
44257
44377
|
/**
|
|
@@ -44260,8 +44380,8 @@ export class WebMapServiceImageryProvider {
|
|
|
44260
44380
|
clock: Clock;
|
|
44261
44381
|
/**
|
|
44262
44382
|
* Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
|
|
44263
|
-
|
|
44264
|
-
|
|
44383
|
+
TimeInterval is an object containing the keys and values of the properties that are used during
|
|
44384
|
+
tile requests.
|
|
44265
44385
|
*/
|
|
44266
44386
|
times: TimeIntervalCollection;
|
|
44267
44387
|
/**
|
|
@@ -44283,36 +44403,36 @@ export class WebMapServiceImageryProvider {
|
|
|
44283
44403
|
* @param level - The tile level.
|
|
44284
44404
|
* @param [request] - The request object. Intended for internal use only.
|
|
44285
44405
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
44286
|
-
|
|
44406
|
+
undefined if there are too many active requests to the server, and the request should be retried later.
|
|
44287
44407
|
*/
|
|
44288
44408
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<ImageryTypes> | undefined;
|
|
44289
44409
|
/**
|
|
44290
44410
|
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
|
|
44291
|
-
|
|
44411
|
+
a tile.
|
|
44292
44412
|
* @param x - The tile X coordinate.
|
|
44293
44413
|
* @param y - The tile Y coordinate.
|
|
44294
44414
|
* @param level - The tile level.
|
|
44295
44415
|
* @param longitude - The longitude at which to pick features.
|
|
44296
44416
|
* @param latitude - The latitude at which to pick features.
|
|
44297
44417
|
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
44298
|
-
|
|
44299
|
-
|
|
44418
|
+
picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
44419
|
+
instances. The array may be empty if no features are found at the given location.
|
|
44300
44420
|
*/
|
|
44301
44421
|
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
44302
44422
|
/**
|
|
44303
44423
|
* The default parameters to include in the WMS URL to obtain images. The values are as follows:
|
|
44304
|
-
|
|
44305
|
-
|
|
44306
|
-
|
|
44307
|
-
|
|
44308
|
-
|
|
44424
|
+
service=WMS
|
|
44425
|
+
version=1.1.1
|
|
44426
|
+
request=GetMap
|
|
44427
|
+
styles=
|
|
44428
|
+
format=image/jpeg
|
|
44309
44429
|
*/
|
|
44310
44430
|
static readonly DefaultParameters: any;
|
|
44311
44431
|
/**
|
|
44312
44432
|
* The default parameters to include in the WMS URL to get feature information. The values are as follows:
|
|
44313
|
-
|
|
44314
|
-
|
|
44315
|
-
|
|
44433
|
+
service=WMS
|
|
44434
|
+
version=1.1.1
|
|
44435
|
+
request=GetFeatureInfo
|
|
44316
44436
|
*/
|
|
44317
44437
|
static readonly GetFeatureInfoDefaultParameters: any;
|
|
44318
44438
|
}
|
|
@@ -44527,29 +44647,29 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44527
44647
|
* A widget containing a Cesium scene.
|
|
44528
44648
|
* @example
|
|
44529
44649
|
* // For each example, include a link to CesiumWidget.css stylesheet in HTML head,
|
|
44530
|
-
|
|
44531
|
-
|
|
44532
|
-
|
|
44533
|
-
|
|
44534
|
-
|
|
44535
|
-
|
|
44536
|
-
|
|
44537
|
-
|
|
44538
|
-
|
|
44539
|
-
|
|
44540
|
-
|
|
44541
|
-
|
|
44542
|
-
|
|
44543
|
-
|
|
44544
|
-
|
|
44545
|
-
|
|
44546
|
-
|
|
44547
|
-
|
|
44548
|
-
|
|
44549
|
-
|
|
44550
|
-
|
|
44551
|
-
|
|
44552
|
-
|
|
44650
|
+
// and in the body, include: <div id="cesiumContainer"></div>
|
|
44651
|
+
|
|
44652
|
+
// Widget with no terrain and default Bing Maps imagery provider.
|
|
44653
|
+
const widget = new Cesium.CesiumWidget("cesiumContainer");
|
|
44654
|
+
|
|
44655
|
+
// Widget with ion imagery and Cesium World Terrain.
|
|
44656
|
+
const widget2 = new Cesium.CesiumWidget("cesiumContainer", {
|
|
44657
|
+
baseLayer: Cesium.ImageryLayer.fromWorldTerrain(),
|
|
44658
|
+
terrain: Cesium.Terrain.fromWorldTerrain()
|
|
44659
|
+
skyBox: new Cesium.SkyBox({
|
|
44660
|
+
sources: {
|
|
44661
|
+
positiveX: "stars/TychoSkymapII.t3_08192x04096_80_px.jpg",
|
|
44662
|
+
negativeX: "stars/TychoSkymapII.t3_08192x04096_80_mx.jpg",
|
|
44663
|
+
positiveY: "stars/TychoSkymapII.t3_08192x04096_80_py.jpg",
|
|
44664
|
+
negativeY: "stars/TychoSkymapII.t3_08192x04096_80_my.jpg",
|
|
44665
|
+
positiveZ: "stars/TychoSkymapII.t3_08192x04096_80_pz.jpg",
|
|
44666
|
+
negativeZ: "stars/TychoSkymapII.t3_08192x04096_80_mz.jpg"
|
|
44667
|
+
}
|
|
44668
|
+
}),
|
|
44669
|
+
// Show Columbus View map with Web Mercator projection
|
|
44670
|
+
sceneMode: Cesium.SceneMode.COLUMBUS_VIEW,
|
|
44671
|
+
mapProjection: new Cesium.WebMercatorProjection()
|
|
44672
|
+
});
|
|
44553
44673
|
* @param container - The DOM element or ID that will contain the widget.
|
|
44554
44674
|
* @param [options] - Object with the following properties:
|
|
44555
44675
|
* @param [options.clock = new Clock()] - The clock to use to control current time.
|
|
@@ -44572,10 +44692,10 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44572
44692
|
* @param [options.automaticallyTrackDataSourceClocks = true] - If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently.
|
|
44573
44693
|
* @param [options.contextOptions] - Context and WebGL creation properties passed to {@link Scene}.
|
|
44574
44694
|
* @param [options.creditContainer] - The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added
|
|
44575
|
-
|
|
44695
|
+
to the bottom of the widget itself.
|
|
44576
44696
|
* @param [options.creditViewport] - The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself.
|
|
44577
44697
|
* @param [options.dataSources = new DataSourceCollection()] - The collection of data sources visualized by the widget. If this parameter is provided,
|
|
44578
|
-
|
|
44698
|
+
the instance is assumed to be owned by the caller and will not be destroyed when the widget is destroyed.
|
|
44579
44699
|
* @param [options.shadows = false] - Determines if shadows are cast by light sources.
|
|
44580
44700
|
* @param [options.terrainShadows = ShadowMode.RECEIVE_ONLY] - Determines if the terrain casts or receives shadows from light sources.
|
|
44581
44701
|
* @param [options.mapMode2D = MapMode2D.INFINITE_SCROLL] - Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
|
|
@@ -44654,7 +44774,7 @@ export class CesiumWidget {
|
|
|
44654
44774
|
readonly dataSourceDisplay: DataSourceDisplay;
|
|
44655
44775
|
/**
|
|
44656
44776
|
* Gets the collection of entities not tied to a particular data source.
|
|
44657
|
-
|
|
44777
|
+
This is a shortcut to [dataSourceDisplay.defaultDataSource.entities]{@link CesiumWidget#dataSourceDisplay}.
|
|
44658
44778
|
*/
|
|
44659
44779
|
readonly entities: EntityCollection;
|
|
44660
44780
|
/**
|
|
@@ -44679,46 +44799,46 @@ export class CesiumWidget {
|
|
|
44679
44799
|
readonly screenSpaceEventHandler: ScreenSpaceEventHandler;
|
|
44680
44800
|
/**
|
|
44681
44801
|
* Gets or sets the target frame rate of the widget when <code>useDefaultRenderLoop</code>
|
|
44682
|
-
|
|
44683
|
-
|
|
44684
|
-
|
|
44802
|
+
is true. If undefined, the browser's requestAnimationFrame implementation
|
|
44803
|
+
determines the frame rate. If defined, this value must be greater than 0. A value higher
|
|
44804
|
+
than the underlying requestAnimationFrame implementation will have no effect.
|
|
44685
44805
|
*/
|
|
44686
44806
|
targetFrameRate: number;
|
|
44687
44807
|
/**
|
|
44688
44808
|
* Gets or sets whether or not this widget should control the render loop.
|
|
44689
|
-
|
|
44690
|
-
|
|
44691
|
-
|
|
44692
|
-
|
|
44693
|
-
|
|
44694
|
-
|
|
44695
|
-
|
|
44696
|
-
|
|
44809
|
+
If true the widget will use requestAnimationFrame to
|
|
44810
|
+
perform rendering and resizing of the widget, as well as drive the
|
|
44811
|
+
simulation clock. If set to false, you must manually call the
|
|
44812
|
+
<code>resize</code>, <code>render</code> methods as part of a custom
|
|
44813
|
+
render loop. If an error occurs during rendering, {@link Scene}'s
|
|
44814
|
+
<code>renderError</code> event will be raised and this property
|
|
44815
|
+
will be set to false. It must be set back to true to continue rendering
|
|
44816
|
+
after the error.
|
|
44697
44817
|
*/
|
|
44698
44818
|
useDefaultRenderLoop: boolean;
|
|
44699
44819
|
/**
|
|
44700
44820
|
* Gets or sets a scaling factor for rendering resolution. Values less than 1.0 can improve
|
|
44701
|
-
|
|
44702
|
-
|
|
44703
|
-
|
|
44704
|
-
|
|
44705
|
-
|
|
44821
|
+
performance on less powerful devices while values greater than 1.0 will render at a higher
|
|
44822
|
+
resolution and then scale down, resulting in improved visual fidelity.
|
|
44823
|
+
For example, if the widget is laid out at a size of 640x480, setting this value to 0.5
|
|
44824
|
+
will cause the scene to be rendered at 320x240 and then scaled up while setting
|
|
44825
|
+
it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
|
|
44706
44826
|
*/
|
|
44707
44827
|
resolutionScale: number;
|
|
44708
44828
|
/**
|
|
44709
44829
|
* Boolean flag indicating if the browser's recommended resolution is used.
|
|
44710
|
-
|
|
44711
|
-
|
|
44712
|
-
|
|
44713
|
-
|
|
44714
|
-
|
|
44830
|
+
If true, the browser's device pixel ratio is ignored and 1.0 is used instead,
|
|
44831
|
+
effectively rendering based on CSS pixels instead of device pixels. This can improve
|
|
44832
|
+
performance on less powerful devices that have high pixel density. When false, rendering
|
|
44833
|
+
will be in device pixels. {@link CesiumWidget#resolutionScale} will still take effect whether
|
|
44834
|
+
this flag is true or false.
|
|
44715
44835
|
*/
|
|
44716
44836
|
useBrowserRecommendedResolution: boolean;
|
|
44717
44837
|
/**
|
|
44718
44838
|
* Gets or sets whether or not data sources can temporarily pause
|
|
44719
|
-
|
|
44720
|
-
|
|
44721
|
-
|
|
44839
|
+
animation in order to avoid showing an incomplete picture to the user.
|
|
44840
|
+
For example, if asynchronous primitives are being processed in the
|
|
44841
|
+
background, the clock will not advance until the geometry is ready.
|
|
44722
44842
|
*/
|
|
44723
44843
|
allowDataSourcesToSuspendAnimation: boolean;
|
|
44724
44844
|
/**
|
|
@@ -44735,9 +44855,9 @@ export class CesiumWidget {
|
|
|
44735
44855
|
clockTrackedDataSource: DataSource;
|
|
44736
44856
|
/**
|
|
44737
44857
|
* Show an error panel to the user containing a title and a longer error message,
|
|
44738
|
-
|
|
44739
|
-
|
|
44740
|
-
|
|
44858
|
+
which can be dismissed using an OK button. This panel is displayed automatically
|
|
44859
|
+
when a render loop error occurs, if showRenderLoopErrors was not false when the
|
|
44860
|
+
widget was constructed.
|
|
44741
44861
|
* @param title - The title to be displayed on the error panel. This string is interpreted as text.
|
|
44742
44862
|
* @param [message] - A helpful, user-facing message to display prior to the detailed error information. This string is interpreted as HTML.
|
|
44743
44863
|
* @param [error] - The error to be displayed on the error panel. This string is formatted using {@link formatError} and then displayed as text.
|
|
@@ -44749,34 +44869,34 @@ export class CesiumWidget {
|
|
|
44749
44869
|
isDestroyed(): boolean;
|
|
44750
44870
|
/**
|
|
44751
44871
|
* Destroys the widget. Should be called if permanently
|
|
44752
|
-
|
|
44872
|
+
removing the widget from layout.
|
|
44753
44873
|
*/
|
|
44754
44874
|
destroy(): void;
|
|
44755
44875
|
/**
|
|
44756
44876
|
* Updates the canvas size, camera aspect ratio, and viewport size.
|
|
44757
|
-
|
|
44758
|
-
|
|
44877
|
+
This function is called automatically as needed unless
|
|
44878
|
+
<code>useDefaultRenderLoop</code> is set to false.
|
|
44759
44879
|
*/
|
|
44760
44880
|
resize(): void;
|
|
44761
44881
|
/**
|
|
44762
44882
|
* Renders the scene. This function is called automatically
|
|
44763
|
-
|
|
44883
|
+
unless <code>useDefaultRenderLoop</code> is set to false;
|
|
44764
44884
|
*/
|
|
44765
44885
|
render(): void;
|
|
44766
44886
|
/**
|
|
44767
44887
|
* Asynchronously sets the camera to view the provided entity, entities, or data source.
|
|
44768
|
-
|
|
44769
|
-
|
|
44770
|
-
|
|
44771
|
-
|
|
44772
|
-
|
|
44773
|
-
|
|
44774
|
-
|
|
44775
|
-
|
|
44776
|
-
|
|
44777
|
-
|
|
44778
|
-
|
|
44779
|
-
|
|
44888
|
+
If the data source is still in the process of loading or the visualization is otherwise still loading,
|
|
44889
|
+
this method waits for the data to be ready before performing the zoom.
|
|
44890
|
+
|
|
44891
|
+
<p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
44892
|
+
The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
44893
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
44894
|
+
angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is
|
|
44895
|
+
zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
44896
|
+
|
|
44897
|
+
<p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
44898
|
+
target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
44899
|
+
determined from the offset, the heading will be north.</p>
|
|
44780
44900
|
* @param target - The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types.
|
|
44781
44901
|
* @param [offset] - The offset from the center of the entity in the local east-north-up reference frame.
|
|
44782
44902
|
* @returns A Promise that resolves to true if the zoom was successful or false if the target is not currently visualized in the scene or the zoom was cancelled.
|
|
@@ -44784,18 +44904,18 @@ export class CesiumWidget {
|
|
|
44784
44904
|
zoomTo(target: Entity | Entity[] | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | Promise<Entity | Entity[] | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | VoxelPrimitive>, offset?: HeadingPitchRange): Promise<boolean>;
|
|
44785
44905
|
/**
|
|
44786
44906
|
* Flies the camera to the provided entity, entities, or data source.
|
|
44787
|
-
|
|
44788
|
-
|
|
44789
|
-
|
|
44790
|
-
|
|
44791
|
-
|
|
44792
|
-
|
|
44793
|
-
|
|
44794
|
-
|
|
44795
|
-
|
|
44796
|
-
|
|
44797
|
-
|
|
44798
|
-
|
|
44907
|
+
If the data source is still in the process of loading or the visualization is otherwise still loading,
|
|
44908
|
+
this method waits for the data to be ready before performing the flight.
|
|
44909
|
+
|
|
44910
|
+
<p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
44911
|
+
The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
44912
|
+
The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
44913
|
+
angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is
|
|
44914
|
+
zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
44915
|
+
|
|
44916
|
+
<p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
44917
|
+
target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
44918
|
+
determined from the offset, the heading will be north.</p>
|
|
44799
44919
|
* @param target - The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types.
|
|
44800
44920
|
* @param [options] - Object with the following properties:
|
|
44801
44921
|
* @param [options.duration = 3.0] - The duration of the flight in seconds.
|
|
@@ -45112,12 +45232,12 @@ export class BaseLayerPickerViewModel {
|
|
|
45112
45232
|
});
|
|
45113
45233
|
/**
|
|
45114
45234
|
* Gets or sets an array of ProviderViewModel instances available for imagery selection.
|
|
45115
|
-
|
|
45235
|
+
This property is observable.
|
|
45116
45236
|
*/
|
|
45117
45237
|
imageryProviderViewModels: ProviderViewModel[];
|
|
45118
45238
|
/**
|
|
45119
45239
|
* Gets or sets an array of ProviderViewModel instances available for terrain selection.
|
|
45120
|
-
|
|
45240
|
+
This property is observable.
|
|
45121
45241
|
*/
|
|
45122
45242
|
terrainProviderViewModels: ProviderViewModel[];
|
|
45123
45243
|
/**
|
|
@@ -45158,7 +45278,7 @@ export class BaseLayerPickerViewModel {
|
|
|
45158
45278
|
* @param options.iconUrl - An icon representing the layer.
|
|
45159
45279
|
* @param [options.category] - A category for the layer.
|
|
45160
45280
|
* @param options.creationFunction - A function or Command
|
|
45161
|
-
|
|
45281
|
+
that creates one or more providers which will be added to the globe when this item is selected.
|
|
45162
45282
|
*/
|
|
45163
45283
|
export class ProviderViewModel {
|
|
45164
45284
|
constructor(options: {
|
|
@@ -45182,7 +45302,7 @@ export class ProviderViewModel {
|
|
|
45182
45302
|
iconUrl: string;
|
|
45183
45303
|
/**
|
|
45184
45304
|
* Gets the Command that creates one or more providers which will be added to
|
|
45185
|
-
|
|
45305
|
+
the globe when this item is selected.
|
|
45186
45306
|
*/
|
|
45187
45307
|
readonly creationCommand: Command;
|
|
45188
45308
|
/**
|