mars3d-cesium 1.126.1 → 1.126.2
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 +1515 -1496
- package/Build/Cesium/Cesium.js +3352 -3351
- package/Build/Cesium/README.md +13 -0
- package/Build/Cesium/Workers/{chunk-UI5WECYT.js → chunk-2ABBI2JG.js} +2 -2
- package/Build/Cesium/Workers/{chunk-PO6W2XWX.js → chunk-2XH33C4K.js} +2 -2
- package/Build/Cesium/Workers/{chunk-DS2EDGZI.js → chunk-3BJ2FCCQ.js} +2 -2
- package/Build/Cesium/Workers/{chunk-W7LTNW7O.js → chunk-3X7V2EO2.js} +2 -2
- package/Build/Cesium/Workers/{chunk-EN3F5NO3.js → chunk-463F4QGB.js} +2 -2
- package/Build/Cesium/Workers/{chunk-E2KNSM3C.js → chunk-4NTIZU6S.js} +1 -1
- package/Build/Cesium/Workers/{chunk-DGBFXKWL.js → chunk-4RE5TK7J.js} +2 -2
- package/Build/Cesium/Workers/{chunk-UMPCXWZT.js → chunk-6GA4Q2DK.js} +2 -2
- package/Build/Cesium/Workers/{chunk-NU6GGMXY.js → chunk-6LYTDESA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-Y5RRTUVB.js → chunk-6VAOYJ4Q.js} +2 -2
- package/Build/Cesium/Workers/{chunk-WOE5HJDH.js → chunk-7JXUEP4W.js} +2 -2
- package/Build/Cesium/Workers/{chunk-P3OPUP4U.js → chunk-7T7XMB3Y.js} +2 -2
- package/Build/Cesium/Workers/chunk-AB73NGS3.js +26 -0
- package/Build/Cesium/Workers/{chunk-O35KINJ4.js → chunk-ACQ7P2GP.js} +2 -2
- package/Build/Cesium/Workers/{chunk-7FIAYWX6.js → chunk-ANR4IFD4.js} +2 -2
- package/Build/Cesium/Workers/{chunk-W5QZ7FJ3.js → chunk-B4Q6LYZ2.js} +2 -2
- package/Build/Cesium/Workers/{chunk-ON55HHHF.js → chunk-BEEWJIFH.js} +1 -1
- package/Build/Cesium/Workers/{chunk-XFNLSMZD.js → chunk-BJSU2TZZ.js} +2 -2
- package/Build/Cesium/Workers/{chunk-GNOYEHMU.js → chunk-BNNASHS5.js} +2 -2
- package/Build/Cesium/Workers/{chunk-VHVOHKQ2.js → chunk-C2P645MX.js} +2 -2
- package/Build/Cesium/Workers/{chunk-SOUS4AYU.js → chunk-CJHX6SWR.js} +2 -2
- package/Build/Cesium/Workers/{chunk-GKD5I4FL.js → chunk-CWP2SDHN.js} +2 -2
- package/Build/Cesium/Workers/{chunk-O46BXGGH.js → chunk-D3P7QTFD.js} +2 -2
- package/Build/Cesium/Workers/{chunk-RSMEFA7O.js → chunk-D5LB274J.js} +2 -2
- package/Build/Cesium/Workers/{chunk-A7ORFV3B.js → chunk-DJD6JBSI.js} +2 -2
- package/Build/Cesium/Workers/{chunk-PKYJQYPB.js → chunk-EHAIRWUB.js} +2 -2
- package/Build/Cesium/Workers/{chunk-QLHVCX3R.js → chunk-GEGB3K2H.js} +2 -2
- package/Build/Cesium/Workers/{chunk-HOYEDAQF.js → chunk-H32B77KM.js} +2 -2
- package/Build/Cesium/Workers/{chunk-HL3IBIYA.js → chunk-HJH5EDUI.js} +2 -2
- package/Build/Cesium/Workers/{chunk-33ASA4FL.js → chunk-JPDPEPPK.js} +2 -2
- package/Build/Cesium/Workers/chunk-JS26HL3Y.js +26 -0
- package/Build/Cesium/Workers/{chunk-YGFQ7F3O.js → chunk-JTVNGPPR.js} +2 -2
- package/Build/Cesium/Workers/{chunk-XCELY5ZL.js → chunk-KOK32Q4J.js} +1 -1
- package/Build/Cesium/Workers/{chunk-ZCEZSPPY.js → chunk-KOZHD7LM.js} +2 -2
- package/Build/Cesium/Workers/{chunk-KOPJTWFY.js → chunk-LSHHQNGK.js} +2 -2
- package/Build/Cesium/Workers/{chunk-RFSHXF2Y.js → chunk-N3QEH6BC.js} +2 -2
- package/Build/Cesium/Workers/{chunk-LCKYF2GY.js → chunk-NPKJLKTD.js} +1 -1
- package/Build/Cesium/Workers/{chunk-XFD5LSWR.js → chunk-NUWAUNN2.js} +1 -1
- package/Build/Cesium/Workers/{chunk-XLCVUZ6B.js → chunk-P5AD4E2S.js} +2 -2
- package/Build/Cesium/Workers/{chunk-G3G2Y5H6.js → chunk-RLNLNL6Y.js} +2 -2
- package/Build/Cesium/Workers/{chunk-RBQ2QGJZ.js → chunk-RTA74CJX.js} +2 -2
- package/Build/Cesium/Workers/{chunk-ZJYOQOZL.js → chunk-RUVZSJPP.js} +2 -2
- package/Build/Cesium/Workers/{chunk-BS3TRCVQ.js → chunk-SCYG2423.js} +2 -2
- package/Build/Cesium/Workers/{chunk-VKSEKKLQ.js → chunk-TGLCLO5X.js} +2 -2
- package/Build/Cesium/Workers/{chunk-52QCGC2Y.js → chunk-TYCSUVZ4.js} +2 -2
- package/Build/Cesium/Workers/{chunk-5FWHATCX.js → chunk-VEIGU5F3.js} +2 -2
- package/Build/Cesium/Workers/{chunk-23SSTEZR.js → chunk-VJ3OOPD5.js} +2 -2
- package/Build/Cesium/Workers/{chunk-WKMWBME2.js → chunk-VPLHXR2B.js} +2 -2
- package/Build/Cesium/Workers/{chunk-4ZIYYG6U.js → chunk-XQZVE3TB.js} +2 -2
- package/Build/Cesium/Workers/{chunk-ZLZKGKDE.js → chunk-XRDG5LN7.js} +2 -2
- package/Build/Cesium/Workers/{chunk-I2P4YCBQ.js → chunk-YB2RTWOV.js} +2 -2
- package/Build/Cesium/Workers/{chunk-JJCEBMTR.js → chunk-YX3IB3TK.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 +7 -7
- package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/index.cjs +3334 -3333
- package/Build/Cesium/index.js +3342 -3341
- package/README.md +141 -141
- package/package.json +1 -1
- package/Build/Cesium/Workers/chunk-2NLN3RGO.js +0 -26
- package/Build/Cesium/Workers/chunk-UYYLORW6.js +0 -26
package/Build/Cesium/Cesium.d.ts
CHANGED
|
@@ -6429,14 +6429,14 @@ export class EllipsoidRhumbLine {
|
|
|
6429
6429
|
interpolateUsingFraction(fraction: number, result?: Cartographic): Cartographic;
|
|
6430
6430
|
/**
|
|
6431
6431
|
* Provides the location of a point at the indicated distance along the rhumb line.
|
|
6432
|
-
* @param distance - The distance from the
|
|
6432
|
+
* @param distance - The distance from the initial point to the point of interest along the rhumbLine.
|
|
6433
6433
|
* @param [result] - The object in which to store the result.
|
|
6434
6434
|
* @returns The location of the point along the rhumb line.
|
|
6435
6435
|
*/
|
|
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.
|
|
@@ -8976,10 +8976,10 @@ export class Interval {
|
|
|
8976
8976
|
|
|
8977
8977
|
/**
|
|
8978
8978
|
* Default settings for accessing the Cesium ion API.
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8979
|
+
|
|
8980
|
+
An ion access token is only required if you are using any ion related APIs.
|
|
8981
|
+
A default access token is provided for evaluation purposes only.
|
|
8982
|
+
Sign up for a free ion account and get your own access token at {@link https://cesium.com}
|
|
8983
8983
|
*/
|
|
8984
8984
|
export namespace Ion {
|
|
8985
8985
|
/**
|
|
@@ -12501,19 +12501,19 @@ export class OrthographicFrustum {
|
|
|
12501
12501
|
|
|
12502
12502
|
/**
|
|
12503
12503
|
* The viewing frustum is defined by 6 planes.
|
|
12504
|
-
Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
12505
|
-
define the unit vector normal to the plane, and the w component is the distance of the
|
|
12506
|
-
plane from the origin/camera position.
|
|
12504
|
+
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
12505
|
+
* define the unit vector normal to the plane, and the w component is the distance of the
|
|
12506
|
+
* plane from the origin/camera position.
|
|
12507
12507
|
* @example
|
|
12508
12508
|
* const maxRadii = ellipsoid.maximumRadius;
|
|
12509
|
-
|
|
12510
|
-
const frustum = new Cesium.OrthographicOffCenterFrustum();
|
|
12511
|
-
frustum.right = maxRadii * Cesium.Math.PI;
|
|
12512
|
-
frustum.left = -c.frustum.right;
|
|
12513
|
-
frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth);
|
|
12514
|
-
frustum.bottom = -c.frustum.top;
|
|
12515
|
-
frustum.near = 0.01 * maxRadii;
|
|
12516
|
-
frustum.far = 50.0 * maxRadii;
|
|
12509
|
+
*
|
|
12510
|
+
* const frustum = new Cesium.OrthographicOffCenterFrustum();
|
|
12511
|
+
* frustum.right = maxRadii * Cesium.Math.PI;
|
|
12512
|
+
* frustum.left = -c.frustum.right;
|
|
12513
|
+
* frustum.top = c.frustum.right * (canvas.clientHeight / canvas.clientWidth);
|
|
12514
|
+
* frustum.bottom = -c.frustum.top;
|
|
12515
|
+
* frustum.near = 0.01 * maxRadii;
|
|
12516
|
+
* frustum.far = 50.0 * maxRadii;
|
|
12517
12517
|
* @param [options] - An object with the following properties:
|
|
12518
12518
|
* @param [options.left] - The left clipping plane distance.
|
|
12519
12519
|
* @param [options.right] - The right clipping plane distance.
|
|
@@ -12563,8 +12563,8 @@ export class OrthographicOffCenterFrustum {
|
|
|
12563
12563
|
* Creates a culling volume for this frustum.
|
|
12564
12564
|
* @example
|
|
12565
12565
|
* // Check if a bounding volume intersects the frustum.
|
|
12566
|
-
|
|
12567
|
-
|
|
12566
|
+
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
|
|
12567
|
+
* const intersect = cullingVolume.computeVisibility(boundingVolume);
|
|
12568
12568
|
* @param position - The eye position.
|
|
12569
12569
|
* @param direction - The view direction.
|
|
12570
12570
|
* @param up - The up direction.
|
|
@@ -12575,8 +12575,8 @@ export class OrthographicOffCenterFrustum {
|
|
|
12575
12575
|
* Returns the pixel's width and height in meters.
|
|
12576
12576
|
* @example
|
|
12577
12577
|
* // Example 1
|
|
12578
|
-
|
|
12579
|
-
|
|
12578
|
+
* // Get the width and height of a pixel.
|
|
12579
|
+
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, scene.pixelRatio, new Cesium.Cartesian2());
|
|
12580
12580
|
* @param drawingBufferWidth - The width of the drawing buffer.
|
|
12581
12581
|
* @param drawingBufferHeight - The height of the drawing buffer.
|
|
12582
12582
|
* @param distance - The distance to the near plane in meters.
|
|
@@ -12593,15 +12593,15 @@ export class OrthographicOffCenterFrustum {
|
|
|
12593
12593
|
clone(result?: OrthographicOffCenterFrustum): OrthographicOffCenterFrustum;
|
|
12594
12594
|
/**
|
|
12595
12595
|
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
|
|
12596
|
-
|
|
12596
|
+
* <code>true</code> if they are equal, <code>false</code> otherwise.
|
|
12597
12597
|
* @param [other] - The right hand side OrthographicOffCenterFrustum.
|
|
12598
12598
|
* @returns <code>true</code> if they are equal, <code>false</code> otherwise.
|
|
12599
12599
|
*/
|
|
12600
12600
|
equals(other?: OrthographicOffCenterFrustum): boolean;
|
|
12601
12601
|
/**
|
|
12602
12602
|
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
|
|
12603
|
-
|
|
12604
|
-
|
|
12603
|
+
* <code>true</code> if they pass an absolute or relative tolerance test,
|
|
12604
|
+
* <code>false</code> otherwise.
|
|
12605
12605
|
* @param other - The right hand side OrthographicOffCenterFrustum.
|
|
12606
12606
|
* @param relativeEpsilon - The relative epsilon tolerance to use for equality testing.
|
|
12607
12607
|
* @param [absoluteEpsilon = relativeEpsilon] - The absolute epsilon tolerance to use for equality testing.
|
|
@@ -16219,7 +16219,7 @@ export namespace ScreenSpaceEventHandler {
|
|
|
16219
16219
|
|
|
16220
16220
|
/**
|
|
16221
16221
|
* Handles user input events. Custom functions can be added to be executed on
|
|
16222
|
-
when the user enters input.
|
|
16222
|
+
* when the user enters input.
|
|
16223
16223
|
* @param [element = document] - The element to add events to.
|
|
16224
16224
|
*/
|
|
16225
16225
|
export class ScreenSpaceEventHandler {
|
|
@@ -16229,14 +16229,14 @@ export class ScreenSpaceEventHandler {
|
|
|
16229
16229
|
* @param action - Function to be executed when the input event occurs.
|
|
16230
16230
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16231
16231
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16232
|
-
|
|
16232
|
+
* event occurs.
|
|
16233
16233
|
*/
|
|
16234
16234
|
setInputAction(action: ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback, type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): void;
|
|
16235
16235
|
/**
|
|
16236
16236
|
* Returns the function to be executed on an input event.
|
|
16237
16237
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16238
16238
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16239
|
-
|
|
16239
|
+
* event occurs.
|
|
16240
16240
|
* @returns The function to be executed on an input event.
|
|
16241
16241
|
*/
|
|
16242
16242
|
getInputAction(type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): ScreenSpaceEventHandler.PositionedEventCallback | ScreenSpaceEventHandler.MotionEventCallback | ScreenSpaceEventHandler.WheelEventCallback | ScreenSpaceEventHandler.TwoPointEventCallback | ScreenSpaceEventHandler.TwoPointMotionEventCallback;
|
|
@@ -16244,35 +16244,35 @@ export class ScreenSpaceEventHandler {
|
|
|
16244
16244
|
* Removes the function to be executed on an input event.
|
|
16245
16245
|
* @param type - The ScreenSpaceEventType of input event.
|
|
16246
16246
|
* @param [modifier] - A KeyboardEventModifier key that is held when a <code>type</code>
|
|
16247
|
-
|
|
16247
|
+
* event occurs.
|
|
16248
16248
|
*/
|
|
16249
16249
|
removeInputAction(type: ScreenSpaceEventType, modifier?: KeyboardEventModifier): void;
|
|
16250
16250
|
/**
|
|
16251
16251
|
* Returns true if this object was destroyed; otherwise, false.
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16252
|
+
* <br /><br />
|
|
16253
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
16254
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
16255
16255
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
16256
16256
|
*/
|
|
16257
16257
|
isDestroyed(): boolean;
|
|
16258
16258
|
/**
|
|
16259
16259
|
* Removes listeners held by this object.
|
|
16260
|
-
|
|
16261
|
-
|
|
16262
|
-
|
|
16263
|
-
|
|
16260
|
+
* <br /><br />
|
|
16261
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
16262
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
16263
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
16264
16264
|
* @example
|
|
16265
16265
|
* handler = handler && handler.destroy();
|
|
16266
16266
|
*/
|
|
16267
16267
|
destroy(): void;
|
|
16268
16268
|
/**
|
|
16269
16269
|
* The amount of time, in milliseconds, that mouse events will be disabled after
|
|
16270
|
-
|
|
16270
|
+
* receiving any touch events, such that any emulated mouse events will be ignored.
|
|
16271
16271
|
*/
|
|
16272
16272
|
static mouseEmulationIgnoreMilliseconds: number;
|
|
16273
16273
|
/**
|
|
16274
16274
|
* The amount of time, in milliseconds, before a touch on the screen becomes a
|
|
16275
|
-
|
|
16275
|
+
* touch and hold.
|
|
16276
16276
|
*/
|
|
16277
16277
|
static touchHoldDelayMilliseconds: number;
|
|
16278
16278
|
}
|
|
@@ -21880,10 +21880,10 @@ export class GeometryVisualizer {
|
|
|
21880
21880
|
constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection);
|
|
21881
21881
|
/**
|
|
21882
21882
|
* Updates all of the primitives created by this visualizer to match their
|
|
21883
|
-
|
|
21883
|
+
* Entity counterpart at the given time.
|
|
21884
21884
|
* @param time - The time to update to.
|
|
21885
21885
|
* @returns True if the visualizer successfully updated to the provided time,
|
|
21886
|
-
|
|
21886
|
+
* false if the visualizer is waiting for asynchronous primitives to be created.
|
|
21887
21887
|
*/
|
|
21888
21888
|
update(time: JulianDate): boolean;
|
|
21889
21889
|
/**
|
|
@@ -24099,10 +24099,10 @@ export class PolylineVisualizer {
|
|
|
24099
24099
|
constructor(scene: Scene, entityCollection: EntityCollection, primitives?: PrimitiveCollection, groundPrimitives?: PrimitiveCollection);
|
|
24100
24100
|
/**
|
|
24101
24101
|
* Updates all of the primitives created by this visualizer to match their
|
|
24102
|
-
|
|
24102
|
+
* Entity counterpart at the given time.
|
|
24103
24103
|
* @param time - The time to update to.
|
|
24104
24104
|
* @returns True if the visualizer successfully updated to the provided time,
|
|
24105
|
-
|
|
24105
|
+
* false if the visualizer is waiting for asynchronous primitives to be created.
|
|
24106
24106
|
*/
|
|
24107
24107
|
update(time: JulianDate): boolean;
|
|
24108
24108
|
/**
|
|
@@ -25990,11 +25990,11 @@ export class ArcGisMapServerImageryProvider {
|
|
|
25990
25990
|
|
|
25991
25991
|
/**
|
|
25992
25992
|
* Default options for accessing the ArcGIS image tile service.
|
|
25993
|
-
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
|
|
25997
|
-
|
|
25993
|
+
|
|
25994
|
+
An ArcGIS access token is required to access ArcGIS image tile layers.
|
|
25995
|
+
A default token is provided for evaluation purposes only.
|
|
25996
|
+
To obtain an access token, go to {@link https://developers.arcgis.com} and create a free account.
|
|
25997
|
+
More info can be found in the {@link https://developers.arcgis.com/documentation/mapping-apis-and-services/security/ | ArcGIS developer guide}.
|
|
25998
25998
|
*/
|
|
25999
25999
|
export namespace ArcGisMapService {
|
|
26000
26000
|
/**
|
|
@@ -27107,23 +27107,23 @@ export type HeadingPitchRollValues = {
|
|
|
27107
27107
|
|
|
27108
27108
|
/**
|
|
27109
27109
|
* The camera is defined by a position, orientation, and view frustum.
|
|
27110
|
-
<br /><br />
|
|
27111
|
-
The orientation forms an orthonormal basis with a view, up and right = view x up unit vectors.
|
|
27112
|
-
<br /><br />
|
|
27113
|
-
The viewing frustum is defined by 6 planes.
|
|
27114
|
-
Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
27115
|
-
define the unit vector normal to the plane, and the w component is the distance of the
|
|
27116
|
-
plane from the origin/camera position.
|
|
27110
|
+
* <br /><br />
|
|
27111
|
+
* The orientation forms an orthonormal basis with a view, up and right = view x up unit vectors.
|
|
27112
|
+
* <br /><br />
|
|
27113
|
+
* The viewing frustum is defined by 6 planes.
|
|
27114
|
+
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
|
|
27115
|
+
* define the unit vector normal to the plane, and the w component is the distance of the
|
|
27116
|
+
* plane from the origin/camera position.
|
|
27117
27117
|
* @example
|
|
27118
27118
|
* // Create a camera looking down the negative z-axis, positioned at the origin,
|
|
27119
|
-
// with a field of view of 60 degrees, and 1:1 aspect ratio.
|
|
27120
|
-
const camera = new Cesium.Camera(scene);
|
|
27121
|
-
camera.position = new Cesium.Cartesian3();
|
|
27122
|
-
camera.direction = Cesium.Cartesian3.negate(Cesium.Cartesian3.UNIT_Z, new Cesium.Cartesian3());
|
|
27123
|
-
camera.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Y);
|
|
27124
|
-
camera.frustum.fov = Cesium.Math.PI_OVER_THREE;
|
|
27125
|
-
camera.frustum.near = 1.0;
|
|
27126
|
-
camera.frustum.far = 2.0;
|
|
27119
|
+
* // with a field of view of 60 degrees, and 1:1 aspect ratio.
|
|
27120
|
+
* const camera = new Cesium.Camera(scene);
|
|
27121
|
+
* camera.position = new Cesium.Cartesian3();
|
|
27122
|
+
* camera.direction = Cesium.Cartesian3.negate(Cesium.Cartesian3.UNIT_Z, new Cesium.Cartesian3());
|
|
27123
|
+
* camera.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Y);
|
|
27124
|
+
* camera.frustum.fov = Cesium.Math.PI_OVER_THREE;
|
|
27125
|
+
* camera.frustum.near = 1.0;
|
|
27126
|
+
* camera.frustum.far = 2.0;
|
|
27127
27127
|
* @param scene - The scene.
|
|
27128
27128
|
*/
|
|
27129
27129
|
export class Camera {
|
|
@@ -27150,22 +27150,22 @@ export class Camera {
|
|
|
27150
27150
|
frustum: PerspectiveFrustum | PerspectiveOffCenterFrustum | OrthographicFrustum;
|
|
27151
27151
|
/**
|
|
27152
27152
|
* The default amount to move the camera when an argument is not
|
|
27153
|
-
|
|
27153
|
+
* provided to the move methods.
|
|
27154
27154
|
*/
|
|
27155
27155
|
defaultMoveAmount: number;
|
|
27156
27156
|
/**
|
|
27157
27157
|
* The default amount to rotate the camera when an argument is not
|
|
27158
|
-
|
|
27158
|
+
* provided to the look methods.
|
|
27159
27159
|
*/
|
|
27160
27160
|
defaultLookAmount: number;
|
|
27161
27161
|
/**
|
|
27162
27162
|
* The default amount to rotate the camera when an argument is not
|
|
27163
|
-
|
|
27163
|
+
* provided to the rotate methods.
|
|
27164
27164
|
*/
|
|
27165
27165
|
defaultRotateAmount: number;
|
|
27166
27166
|
/**
|
|
27167
27167
|
* The default amount to move the camera when an argument is not
|
|
27168
|
-
|
|
27168
|
+
* provided to the zoom methods.
|
|
27169
27169
|
*/
|
|
27170
27170
|
defaultZoomAmount: number;
|
|
27171
27171
|
/**
|
|
@@ -27174,7 +27174,7 @@ export class Camera {
|
|
|
27174
27174
|
constrainedAxis: Cartesian3 | undefined;
|
|
27175
27175
|
/**
|
|
27176
27176
|
* The factor multiplied by the the map size used to determine where to clamp the camera position
|
|
27177
|
-
|
|
27177
|
+
* when zooming out from the surface. The default is 1.5. Only valid for 2D and the map is rotatable.
|
|
27178
27178
|
*/
|
|
27179
27179
|
maximumZoomFactor: number;
|
|
27180
27180
|
/**
|
|
@@ -27187,8 +27187,8 @@ export class Camera {
|
|
|
27187
27187
|
static DEFAULT_VIEW_RECTANGLE: Rectangle;
|
|
27188
27188
|
/**
|
|
27189
27189
|
* A scalar to multiply to the camera position and add it back after setting the camera to view the rectangle.
|
|
27190
|
-
|
|
27191
|
-
|
|
27190
|
+
* A value of zero means the camera will view the entire {@link Camera#DEFAULT_VIEW_RECTANGLE}, a value greater than zero
|
|
27191
|
+
* will move it further away from the extent, and a value less than zero will move it close to the extent.
|
|
27192
27192
|
*/
|
|
27193
27193
|
static DEFAULT_VIEW_FACTOR: number;
|
|
27194
27194
|
/**
|
|
@@ -27213,9 +27213,9 @@ export class Camera {
|
|
|
27213
27213
|
readonly inverseViewMatrix: Matrix4;
|
|
27214
27214
|
/**
|
|
27215
27215
|
* Gets the {@link Cartographic} position of the camera, with longitude and latitude
|
|
27216
|
-
|
|
27217
|
-
|
|
27218
|
-
|
|
27216
|
+
* expressed in radians and height in meters. In 2D and Columbus View, it is possible
|
|
27217
|
+
* for the returned longitude and latitude to be outside the range of valid longitudes
|
|
27218
|
+
* and latitudes when the camera is outside the map.
|
|
27219
27219
|
*/
|
|
27220
27220
|
readonly positionCartographic: Cartographic;
|
|
27221
27221
|
/**
|
|
@@ -27262,48 +27262,48 @@ export class Camera {
|
|
|
27262
27262
|
* Sets the camera position, orientation and transform.
|
|
27263
27263
|
* @example
|
|
27264
27264
|
* // 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
|
-
|
|
27265
|
+
* viewer.camera.setView({
|
|
27266
|
+
* destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
|
|
27267
|
+
* });
|
|
27268
|
+
*
|
|
27269
|
+
* // 2 Set view with heading, pitch and roll
|
|
27270
|
+
* viewer.camera.setView({
|
|
27271
|
+
* destination : cartesianPosition,
|
|
27272
|
+
* orientation: {
|
|
27273
|
+
* heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
|
|
27274
|
+
* pitch : Cesium.Math.toRadians(-90), // default value (looking down)
|
|
27275
|
+
* roll : 0.0 // default value
|
|
27276
|
+
* }
|
|
27277
|
+
* });
|
|
27278
|
+
*
|
|
27279
|
+
* // 3. Change heading, pitch and roll with the camera position remaining the same.
|
|
27280
|
+
* viewer.camera.setView({
|
|
27281
|
+
* orientation: {
|
|
27282
|
+
* heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
|
|
27283
|
+
* pitch : Cesium.Math.toRadians(-90), // default value (looking down)
|
|
27284
|
+
* roll : 0.0 // default value
|
|
27285
|
+
* }
|
|
27286
|
+
* });
|
|
27287
|
+
*
|
|
27288
|
+
*
|
|
27289
|
+
* // 4. View rectangle with a top-down view
|
|
27290
|
+
* viewer.camera.setView({
|
|
27291
|
+
* destination : Cesium.Rectangle.fromDegrees(west, south, east, north)
|
|
27292
|
+
* });
|
|
27293
|
+
*
|
|
27294
|
+
* // 5. Set position with an orientation using unit vectors.
|
|
27295
|
+
* viewer.camera.setView({
|
|
27296
|
+
* destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27297
|
+
* orientation : {
|
|
27298
|
+
* direction : new Cesium.Cartesian3(-0.04231243104240401, -0.20123236049443421, -0.97862924300734),
|
|
27299
|
+
* up : new Cesium.Cartesian3(-0.47934589305293746, -0.8553216253114552, 0.1966022179118339)
|
|
27300
|
+
* }
|
|
27301
|
+
* });
|
|
27302
27302
|
* @param options - Object with the following properties:
|
|
27303
27303
|
* @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
27304
|
* @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
|
-
|
|
27305
|
+
* 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
|
|
27306
|
+
* y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
|
|
27307
27307
|
* @param [options.endTransform] - Transform matrix representing the reference frame of the camera.
|
|
27308
27308
|
* @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
27309
|
*/
|
|
@@ -27315,8 +27315,8 @@ export class Camera {
|
|
|
27315
27315
|
}): void;
|
|
27316
27316
|
/**
|
|
27317
27317
|
* Fly the camera to the home view. Use {@link Camera#.DEFAULT_VIEW_RECTANGLE} to set
|
|
27318
|
-
|
|
27319
|
-
|
|
27318
|
+
* the default view for the 3D scene. The home view for 2D and columbus view shows the
|
|
27319
|
+
* entire map.
|
|
27320
27320
|
* @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
27321
|
*/
|
|
27322
27322
|
flyHome(duration?: number): void;
|
|
@@ -27370,14 +27370,14 @@ export class Camera {
|
|
|
27370
27370
|
move(direction: Cartesian3, amount?: number): void;
|
|
27371
27371
|
/**
|
|
27372
27372
|
* Translates the camera's position by <code>amount</code> along the camera's view vector.
|
|
27373
|
-
|
|
27373
|
+
* When in 2D mode, this will zoom in the camera instead of translating the camera's position.
|
|
27374
27374
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27375
27375
|
*/
|
|
27376
27376
|
moveForward(amount?: number): void;
|
|
27377
27377
|
/**
|
|
27378
27378
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27379
|
-
|
|
27380
|
-
|
|
27379
|
+
* of the camera's view vector.
|
|
27380
|
+
* When in 2D mode, this will zoom out the camera instead of translating the camera's position.
|
|
27381
27381
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27382
27382
|
*/
|
|
27383
27383
|
moveBackward(amount?: number): void;
|
|
@@ -27388,7 +27388,7 @@ export class Camera {
|
|
|
27388
27388
|
moveUp(amount?: number): void;
|
|
27389
27389
|
/**
|
|
27390
27390
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27391
|
-
|
|
27391
|
+
* of the camera's up vector.
|
|
27392
27392
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27393
27393
|
*/
|
|
27394
27394
|
moveDown(amount?: number): void;
|
|
@@ -27399,31 +27399,31 @@ export class Camera {
|
|
|
27399
27399
|
moveRight(amount?: number): void;
|
|
27400
27400
|
/**
|
|
27401
27401
|
* Translates the camera's position by <code>amount</code> along the opposite direction
|
|
27402
|
-
|
|
27402
|
+
* of the camera's right vector.
|
|
27403
27403
|
* @param [amount] - The amount, in meters, to move. Defaults to <code>defaultMoveAmount</code>.
|
|
27404
27404
|
*/
|
|
27405
27405
|
moveLeft(amount?: number): void;
|
|
27406
27406
|
/**
|
|
27407
27407
|
* Rotates the camera around its up vector by amount, in radians, in the opposite direction
|
|
27408
|
-
|
|
27408
|
+
* of its right vector if not in 2D mode.
|
|
27409
27409
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27410
27410
|
*/
|
|
27411
27411
|
lookLeft(amount?: number): void;
|
|
27412
27412
|
/**
|
|
27413
27413
|
* Rotates the camera around its up vector by amount, in radians, in the direction
|
|
27414
|
-
|
|
27414
|
+
* of its right vector if not in 2D mode.
|
|
27415
27415
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27416
27416
|
*/
|
|
27417
27417
|
lookRight(amount?: number): void;
|
|
27418
27418
|
/**
|
|
27419
27419
|
* Rotates the camera around its right vector by amount, in radians, in the direction
|
|
27420
|
-
|
|
27420
|
+
* of its up vector if not in 2D mode.
|
|
27421
27421
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27422
27422
|
*/
|
|
27423
27423
|
lookUp(amount?: number): void;
|
|
27424
27424
|
/**
|
|
27425
27425
|
* Rotates the camera around its right vector by amount, in radians, in the opposite direction
|
|
27426
|
-
|
|
27426
|
+
* of its up vector if not in 2D mode.
|
|
27427
27427
|
* @param [amount] - The amount, in radians, to rotate by. Defaults to <code>defaultLookAmount</code>.
|
|
27428
27428
|
*/
|
|
27429
27429
|
lookDown(amount?: number): void;
|
|
@@ -27445,7 +27445,7 @@ export class Camera {
|
|
|
27445
27445
|
twistRight(amount?: number): void;
|
|
27446
27446
|
/**
|
|
27447
27447
|
* Rotates the camera around <code>axis</code> by <code>angle</code>. The distance
|
|
27448
|
-
|
|
27448
|
+
* of the camera's position to the center of the camera's reference frame remains the same.
|
|
27449
27449
|
* @param axis - The axis to rotate around given in world coordinates.
|
|
27450
27450
|
* @param [angle] - The angle, in radians, to rotate by. Defaults to <code>defaultRotateAmount</code>.
|
|
27451
27451
|
*/
|
|
@@ -27477,63 +27477,63 @@ export class Camera {
|
|
|
27477
27477
|
zoomIn(amount?: number): void;
|
|
27478
27478
|
/**
|
|
27479
27479
|
* Zooms <code>amount</code> along the opposite direction of
|
|
27480
|
-
|
|
27480
|
+
* the camera's view vector.
|
|
27481
27481
|
* @param [amount] - The amount to move. Defaults to <code>defaultZoomAmount</code>.
|
|
27482
27482
|
*/
|
|
27483
27483
|
zoomOut(amount?: number): void;
|
|
27484
27484
|
/**
|
|
27485
27485
|
* Gets the magnitude of the camera position. In 3D, this is the vector magnitude. In 2D and
|
|
27486
|
-
|
|
27486
|
+
* Columbus view, this is the distance to the map.
|
|
27487
27487
|
* @returns The magnitude of the position.
|
|
27488
27488
|
*/
|
|
27489
27489
|
getMagnitude(): number;
|
|
27490
27490
|
/**
|
|
27491
27491
|
* 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
|
-
|
|
27492
|
+
* 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.
|
|
27493
|
+
* 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
|
|
27494
|
+
* is heading/pitch/range, then the heading and the pitch angles are defined in the reference frame defined by the transformation matrix.
|
|
27495
|
+
* The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27496
|
+
* angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center.
|
|
27497
|
+
*
|
|
27498
|
+
* In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
27499
|
+
* target will be the magnitude of the offset. The heading will be determined from the offset. If the heading cannot be
|
|
27500
|
+
* determined from the offset, the heading will be north.
|
|
27501
27501
|
* @example
|
|
27502
27502
|
* // 1. Using a cartesian offset
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
27511
|
-
|
|
27503
|
+
* const center = Cesium.Cartesian3.fromDegrees(-98.0, 40.0);
|
|
27504
|
+
* viewer.camera.lookAt(center, new Cesium.Cartesian3(0.0, -4790000.0, 3930000.0));
|
|
27505
|
+
*
|
|
27506
|
+
* // 2. Using a HeadingPitchRange offset
|
|
27507
|
+
* const center = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
|
|
27508
|
+
* const heading = Cesium.Math.toRadians(50.0);
|
|
27509
|
+
* const pitch = Cesium.Math.toRadians(-20.0);
|
|
27510
|
+
* const range = 5000.0;
|
|
27511
|
+
* viewer.camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, range));
|
|
27512
27512
|
* @param target - The target position in world coordinates.
|
|
27513
27513
|
* @param offset - The offset from the target in the local east-north-up reference frame centered at the target.
|
|
27514
27514
|
*/
|
|
27515
27515
|
lookAt(target: Cartesian3, offset: Cartesian3 | HeadingPitchRange): void;
|
|
27516
27516
|
/**
|
|
27517
27517
|
* 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
|
-
|
|
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 center of the reference frame. 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.
|
|
27526
27526
|
* @example
|
|
27527
27527
|
* // 1. Using a cartesian offset
|
|
27528
|
-
|
|
27529
|
-
|
|
27530
|
-
|
|
27531
|
-
|
|
27532
|
-
|
|
27533
|
-
|
|
27534
|
-
|
|
27535
|
-
|
|
27536
|
-
|
|
27528
|
+
* const transform = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(-98.0, 40.0));
|
|
27529
|
+
* viewer.camera.lookAtTransform(transform, new Cesium.Cartesian3(0.0, -4790000.0, 3930000.0));
|
|
27530
|
+
*
|
|
27531
|
+
* // 2. Using a HeadingPitchRange offset
|
|
27532
|
+
* const transform = Cesium.Transforms.eastNorthUpToFixedFrame(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.lookAtTransform(transform, new Cesium.HeadingPitchRange(heading, pitch, range));
|
|
27537
27537
|
* @param transform - The transformation matrix defining the reference frame.
|
|
27538
27538
|
* @param [offset] - The offset from the target in a reference frame centered at the target.
|
|
27539
27539
|
*/
|
|
@@ -27549,20 +27549,20 @@ export class Camera {
|
|
|
27549
27549
|
* Pick an ellipsoid or map.
|
|
27550
27550
|
* @example
|
|
27551
27551
|
* const canvas = viewer.scene.canvas;
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27552
|
+
* const center = new Cesium.Cartesian2(canvas.clientWidth / 2.0, canvas.clientHeight / 2.0);
|
|
27553
|
+
* const ellipsoid = viewer.scene.ellipsoid;
|
|
27554
|
+
* const result = viewer.camera.pickEllipsoid(center, ellipsoid);
|
|
27555
27555
|
* @param windowPosition - The x and y coordinates of a pixel.
|
|
27556
27556
|
* @param [ellipsoid = Ellipsoid.default] - The ellipsoid to pick.
|
|
27557
27557
|
* @param [result] - The object onto which to store the result.
|
|
27558
27558
|
* @returns If the ellipsoid or map was picked,
|
|
27559
|
-
|
|
27560
|
-
|
|
27559
|
+
* returns the point on the surface of the ellipsoid or map in world
|
|
27560
|
+
* coordinates. If the ellipsoid or map was not picked, returns undefined.
|
|
27561
27561
|
*/
|
|
27562
27562
|
pickEllipsoid(windowPosition: Cartesian2, ellipsoid?: Ellipsoid, result?: Cartesian3): Cartesian3 | undefined;
|
|
27563
27563
|
/**
|
|
27564
27564
|
* Create a ray from the camera position through the pixel at <code>windowPosition</code>
|
|
27565
|
-
|
|
27565
|
+
* in world coordinates.
|
|
27566
27566
|
* @param windowPosition - The x and y coordinates of a pixel.
|
|
27567
27567
|
* @param [result] - The object onto which to store the result.
|
|
27568
27568
|
* @returns Returns the {@link Cartesian3} position and direction of the ray, or undefined if the pick ray cannot be determined.
|
|
@@ -27584,50 +27584,50 @@ export class Camera {
|
|
|
27584
27584
|
getPixelSize(boundingSphere: BoundingSphere, drawingBufferWidth: number, drawingBufferHeight: number): number;
|
|
27585
27585
|
/**
|
|
27586
27586
|
* Cancels the current camera flight and leaves the camera at its current location.
|
|
27587
|
-
|
|
27587
|
+
* If no flight is in progress, this function does nothing.
|
|
27588
27588
|
*/
|
|
27589
27589
|
cancelFlight(): void;
|
|
27590
27590
|
/**
|
|
27591
27591
|
* Completes the current camera flight and moves the camera immediately to its final destination.
|
|
27592
|
-
|
|
27592
|
+
* If no flight is in progress, this function does nothing.
|
|
27593
27593
|
*/
|
|
27594
27594
|
completeFlight(): void;
|
|
27595
27595
|
/**
|
|
27596
27596
|
* Flies the camera from its current position to a new position.
|
|
27597
27597
|
* @example
|
|
27598
27598
|
* // 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
|
-
|
|
27599
|
+
* viewer.camera.flyTo({
|
|
27600
|
+
* destination : Cesium.Cartesian3.fromDegrees(-117.16, 32.71, 15000.0)
|
|
27601
|
+
* });
|
|
27602
|
+
*
|
|
27603
|
+
* // 2. Fly to a Rectangle with a top-down view
|
|
27604
|
+
* viewer.camera.flyTo({
|
|
27605
|
+
* destination : Cesium.Rectangle.fromDegrees(west, south, east, north)
|
|
27606
|
+
* });
|
|
27607
|
+
*
|
|
27608
|
+
* // 3. Fly to a position with an orientation using unit vectors.
|
|
27609
|
+
* viewer.camera.flyTo({
|
|
27610
|
+
* destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27611
|
+
* orientation : {
|
|
27612
|
+
* direction : new Cesium.Cartesian3(-0.04231243104240401, -0.20123236049443421, -0.97862924300734),
|
|
27613
|
+
* up : new Cesium.Cartesian3(-0.47934589305293746, -0.8553216253114552, 0.1966022179118339)
|
|
27614
|
+
* }
|
|
27615
|
+
* });
|
|
27616
|
+
*
|
|
27617
|
+
* // 4. Fly to a position with an orientation using heading, pitch and roll.
|
|
27618
|
+
* viewer.camera.flyTo({
|
|
27619
|
+
* destination : Cesium.Cartesian3.fromDegrees(-122.19, 46.25, 5000.0),
|
|
27620
|
+
* orientation : {
|
|
27621
|
+
* heading : Cesium.Math.toRadians(175.0),
|
|
27622
|
+
* pitch : Cesium.Math.toRadians(-35.0),
|
|
27623
|
+
* roll : 0.0
|
|
27624
|
+
* }
|
|
27625
|
+
* });
|
|
27626
27626
|
* @param options - Object with the following properties:
|
|
27627
27627
|
* @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
27628
|
* @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
|
-
|
|
27629
|
+
* 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
|
|
27630
|
+
* y direction in Columbus view. Orientation is not used in 2D when in infinite scrolling mode.
|
|
27631
27631
|
* @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
27632
|
* @param [options.complete] - The function to execute when the flight is complete.
|
|
27633
27633
|
* @param [options.cancel] - The function to execute if the flight is cancelled.
|
|
@@ -27655,31 +27655,31 @@ export class Camera {
|
|
|
27655
27655
|
}): void;
|
|
27656
27656
|
/**
|
|
27657
27657
|
* Sets the camera so that the current view contains the provided bounding sphere.
|
|
27658
|
-
|
|
27659
|
-
|
|
27660
|
-
|
|
27661
|
-
|
|
27662
|
-
|
|
27663
|
-
|
|
27664
|
-
|
|
27665
|
-
|
|
27666
|
-
|
|
27667
|
-
|
|
27658
|
+
*
|
|
27659
|
+
* <p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
27660
|
+
* The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
27661
|
+
* The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27662
|
+
* angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center. If the range is
|
|
27663
|
+
* zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
27664
|
+
*
|
|
27665
|
+
* <p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
27666
|
+
* target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
27667
|
+
* determined from the offset, the heading will be north.</p>
|
|
27668
27668
|
* @param boundingSphere - The bounding sphere to view, in world coordinates.
|
|
27669
27669
|
* @param [offset] - The offset from the target in the local east-north-up reference frame centered at the target.
|
|
27670
27670
|
*/
|
|
27671
27671
|
viewBoundingSphere(boundingSphere: BoundingSphere, offset?: HeadingPitchRange): void;
|
|
27672
27672
|
/**
|
|
27673
27673
|
* Flies the camera to a location where the current view contains the provided bounding sphere.
|
|
27674
|
-
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
|
|
27678
|
-
|
|
27679
|
-
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27674
|
+
*
|
|
27675
|
+
* <p> The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
27676
|
+
* The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
27677
|
+
* The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
27678
|
+
* angles are below the plane. Negative pitch angles are above the plane. The range is the distance from the center. If the range is
|
|
27679
|
+
* zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
27680
|
+
*
|
|
27681
|
+
* <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
|
|
27682
|
+
* target will be the range. The heading will be aligned to local north.</p>
|
|
27683
27683
|
* @param boundingSphere - The bounding sphere to view, in world coordinates.
|
|
27684
27684
|
* @param [options] - Object with the following properties:
|
|
27685
27685
|
* @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 +27714,14 @@ export class Camera {
|
|
|
27714
27714
|
computeViewRectangle(ellipsoid?: Ellipsoid, result?: Rectangle): Rectangle | undefined;
|
|
27715
27715
|
/**
|
|
27716
27716
|
* Switches the frustum/projection to perspective.
|
|
27717
|
-
|
|
27718
|
-
|
|
27717
|
+
*
|
|
27718
|
+
* This function is a no-op in 2D which must always be orthographic.
|
|
27719
27719
|
*/
|
|
27720
27720
|
switchToPerspectiveFrustum(): void;
|
|
27721
27721
|
/**
|
|
27722
27722
|
* Switches the frustum/projection to orthographic.
|
|
27723
|
-
|
|
27724
|
-
|
|
27723
|
+
*
|
|
27724
|
+
* This function is a no-op in 2D which will always be orthographic.
|
|
27725
27725
|
*/
|
|
27726
27726
|
switchToOrthographicFrustum(): void;
|
|
27727
27727
|
}
|
|
@@ -27854,10 +27854,10 @@ export enum CameraEventType {
|
|
|
27854
27854
|
|
|
27855
27855
|
/**
|
|
27856
27856
|
* A tile in a {@link Cesium3DTileset}. When a tile is first created, its content is not loaded;
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
27860
|
-
|
|
27857
|
+
the content is loaded on-demand when needed based on the view.
|
|
27858
|
+
<p>
|
|
27859
|
+
Do not construct this directly, instead access tiles through {@link Cesium3DTileset#tileVisible}.
|
|
27860
|
+
</p>
|
|
27861
27861
|
* @param tileset - The tileset
|
|
27862
27862
|
* @param baseResource - The base resource for the tileset
|
|
27863
27863
|
* @param header - The JSON header for the tile
|
|
@@ -27875,7 +27875,7 @@ export class Cesium3DTile {
|
|
|
27875
27875
|
readonly computedTransform: Matrix4;
|
|
27876
27876
|
/**
|
|
27877
27877
|
* The error, in meters, introduced if this tile is rendered and its children are not.
|
|
27878
|
-
|
|
27878
|
+
This is used to compute screen space error, i.e., the error measured in pixels.
|
|
27879
27879
|
*/
|
|
27880
27880
|
readonly geometricError: number;
|
|
27881
27881
|
/**
|
|
@@ -27884,11 +27884,11 @@ export class Cesium3DTile {
|
|
|
27884
27884
|
readonly children: Cesium3DTile[];
|
|
27885
27885
|
/**
|
|
27886
27886
|
* This tile's parent or <code>undefined</code> if this tile is the root.
|
|
27887
|
-
|
|
27888
|
-
|
|
27889
|
-
|
|
27890
|
-
|
|
27891
|
-
|
|
27887
|
+
<p>
|
|
27888
|
+
When a tile's content points to an external tileset JSON file, the external tileset's
|
|
27889
|
+
root tile's parent is not <code>undefined</code>; instead, the parent references
|
|
27890
|
+
the tile (with its content pointing to an external tileset JSON file) as if the two tilesets were merged.
|
|
27891
|
+
</p>
|
|
27892
27892
|
*/
|
|
27893
27893
|
readonly parent: Cesium3DTile;
|
|
27894
27894
|
/**
|
|
@@ -27905,7 +27905,7 @@ export class Cesium3DTile {
|
|
|
27905
27905
|
readonly tileset: Cesium3DTileset;
|
|
27906
27906
|
/**
|
|
27907
27907
|
* The tile's content. This represents the actual tile's payload,
|
|
27908
|
-
|
|
27908
|
+
not the content's metadata in the tileset JSON file.
|
|
27909
27909
|
*/
|
|
27910
27910
|
readonly content: Cesium3DTileContent;
|
|
27911
27911
|
/**
|
|
@@ -27914,7 +27914,7 @@ export class Cesium3DTile {
|
|
|
27914
27914
|
readonly boundingSphere: BoundingSphere;
|
|
27915
27915
|
/**
|
|
27916
27916
|
* Returns the <code>extras</code> property in the tileset JSON for this tile, which contains application specific metadata.
|
|
27917
|
-
|
|
27917
|
+
Returns <code>undefined</code> if <code>extras</code> does not exist.
|
|
27918
27918
|
*/
|
|
27919
27919
|
readonly extras: any;
|
|
27920
27920
|
/**
|
|
@@ -30116,12 +30116,12 @@ export class Cesium3DTileStyle {
|
|
|
30116
30116
|
|
|
30117
30117
|
/**
|
|
30118
30118
|
* A {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
30119
|
-
|
|
30120
|
-
|
|
30121
|
-
|
|
30122
|
-
|
|
30123
|
-
|
|
30124
|
-
|
|
30119
|
+
<p>
|
|
30120
|
+
Implements the {@link VoxelProvider} interface.
|
|
30121
|
+
</p>
|
|
30122
|
+
<div class="notice">
|
|
30123
|
+
This object is normally not instantiated directly, use {@link Cesium3DTilesVoxelProvider.fromUrl}.
|
|
30124
|
+
</div>
|
|
30125
30125
|
* @param options - Object with the following properties:
|
|
30126
30126
|
*/
|
|
30127
30127
|
export class Cesium3DTilesVoxelProvider extends VoxelProvider {
|
|
@@ -30142,69 +30142,69 @@ export class Cesium3DTilesVoxelProvider extends VoxelProvider {
|
|
|
30142
30142
|
readonly shapeTransform: Matrix4 | undefined;
|
|
30143
30143
|
/**
|
|
30144
30144
|
* Gets the {@link VoxelShapeType}
|
|
30145
|
-
|
|
30145
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30146
30146
|
*/
|
|
30147
30147
|
readonly shape: VoxelShapeType;
|
|
30148
30148
|
/**
|
|
30149
30149
|
* Gets the minimum bounds.
|
|
30150
|
-
|
|
30151
|
-
|
|
30150
|
+
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
30152
|
*/
|
|
30153
30153
|
readonly minBounds: Cartesian3 | undefined;
|
|
30154
30154
|
/**
|
|
30155
30155
|
* Gets the maximum bounds.
|
|
30156
|
-
|
|
30157
|
-
|
|
30156
|
+
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
30158
|
*/
|
|
30159
30159
|
readonly maxBounds: Cartesian3 | undefined;
|
|
30160
30160
|
/**
|
|
30161
30161
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
30162
|
-
|
|
30162
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30163
30163
|
*/
|
|
30164
30164
|
readonly dimensions: Cartesian3;
|
|
30165
30165
|
/**
|
|
30166
30166
|
* 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
|
-
|
|
30167
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30168
30168
|
*/
|
|
30169
30169
|
readonly paddingBefore: Cartesian3 | undefined;
|
|
30170
30170
|
/**
|
|
30171
30171
|
* 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
|
-
|
|
30172
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30173
30173
|
*/
|
|
30174
30174
|
readonly paddingAfter: Cartesian3 | undefined;
|
|
30175
30175
|
/**
|
|
30176
30176
|
* Gets the metadata names.
|
|
30177
|
-
|
|
30177
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30178
30178
|
*/
|
|
30179
30179
|
readonly names: string[];
|
|
30180
30180
|
/**
|
|
30181
30181
|
* Gets the metadata types.
|
|
30182
|
-
|
|
30182
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30183
30183
|
*/
|
|
30184
30184
|
readonly types: MetadataType[];
|
|
30185
30185
|
/**
|
|
30186
30186
|
* Gets the metadata component types.
|
|
30187
|
-
|
|
30187
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30188
30188
|
*/
|
|
30189
30189
|
readonly componentTypes: MetadataComponentType[];
|
|
30190
30190
|
/**
|
|
30191
30191
|
* Gets the metadata minimum values.
|
|
30192
|
-
|
|
30192
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30193
30193
|
*/
|
|
30194
30194
|
readonly minimumValues: number[][] | undefined;
|
|
30195
30195
|
/**
|
|
30196
30196
|
* Gets the metadata maximum values.
|
|
30197
|
-
|
|
30197
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30198
30198
|
*/
|
|
30199
30199
|
readonly maximumValues: number[][] | undefined;
|
|
30200
30200
|
/**
|
|
30201
30201
|
* 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.
|
|
30202
|
-
|
|
30202
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30203
30203
|
*/
|
|
30204
30204
|
readonly maximumTileCount: number | undefined;
|
|
30205
30205
|
/**
|
|
30206
30206
|
* Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z.
|
|
30207
|
-
|
|
30207
|
+
This function should not be called before {@link VoxelProvider#ready} returns true.
|
|
30208
30208
|
* @param [options] - Object with the following properties:
|
|
30209
30209
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
30210
30210
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
@@ -31132,41 +31132,41 @@ export function createElevationBandMaterial(options: {
|
|
|
31132
31132
|
|
|
31133
31133
|
/**
|
|
31134
31134
|
* Creates a {@link Cesium3DTileset} instance for the Google Photorealistic 3D
|
|
31135
|
-
|
|
31136
|
-
|
|
31137
|
-
|
|
31138
|
-
|
|
31139
|
-
|
|
31140
|
-
|
|
31135
|
+
Tiles tileset.
|
|
31136
|
+
|
|
31137
|
+
Google Photorealistic 3D Tiles can only be used with the Google geocoder. To
|
|
31138
|
+
confirm that you are aware of this restriction pass
|
|
31139
|
+
`usingOnlyWithGoogleGeocoder: true` to the apiOptions. Otherwise a one time
|
|
31140
|
+
warning will be displayed when this function is called.
|
|
31141
31141
|
* @example
|
|
31142
31142
|
* const viewer = new Cesium.Viewer("cesiumContainer", {
|
|
31143
|
-
|
|
31144
|
-
|
|
31145
|
-
|
|
31146
|
-
|
|
31147
|
-
|
|
31148
|
-
|
|
31149
|
-
|
|
31150
|
-
|
|
31151
|
-
|
|
31152
|
-
|
|
31153
|
-
|
|
31143
|
+
geocoder: Cesium.IonGeocodeProviderType.GOOGLE
|
|
31144
|
+
});
|
|
31145
|
+
|
|
31146
|
+
try {
|
|
31147
|
+
const tileset = await Cesium.createGooglePhotorealistic3DTileset({
|
|
31148
|
+
onlyUsingWithGoogleGeocoder: true,
|
|
31149
|
+
});
|
|
31150
|
+
viewer.scene.primitives.add(tileset));
|
|
31151
|
+
} catch (error) {
|
|
31152
|
+
console.log(`Error creating tileset: ${error}`);
|
|
31153
|
+
}
|
|
31154
31154
|
* @example
|
|
31155
31155
|
* // Use your own Google Maps API key
|
|
31156
|
-
|
|
31157
|
-
|
|
31158
|
-
|
|
31159
|
-
|
|
31160
|
-
|
|
31161
|
-
|
|
31162
|
-
|
|
31163
|
-
|
|
31164
|
-
|
|
31165
|
-
|
|
31166
|
-
|
|
31167
|
-
|
|
31168
|
-
|
|
31169
|
-
|
|
31156
|
+
Cesium.GoogleMaps.defaultApiKey = "your-api-key";
|
|
31157
|
+
|
|
31158
|
+
const viewer = new Cesium.Viewer("cesiumContainer". {
|
|
31159
|
+
geocoder: Cesium.IonGeocodeProviderType.GOOGLE
|
|
31160
|
+
});
|
|
31161
|
+
|
|
31162
|
+
try {
|
|
31163
|
+
const tileset = await Cesium.createGooglePhotorealistic3DTileset({
|
|
31164
|
+
onlyUsingWithGoogleGeocoder: true,
|
|
31165
|
+
});
|
|
31166
|
+
viewer.scene.primitives.add(tileset));
|
|
31167
|
+
} catch (error) {
|
|
31168
|
+
console.log(`Error creating tileset: ${error}`);
|
|
31169
|
+
}
|
|
31170
31170
|
* @param [apiOptions.key = GoogleMaps.defaultApiKey] - Your API key to access Google Photorealistic 3D Tiles. See {@link https://developers.google.com/maps/documentation/javascript/get-api-key} for instructions on how to create your own key.
|
|
31171
31171
|
* @param [apiOptions.onlyUsingWithGoogleGeocoder] - Confirmation that this tileset will only be used with the Google geocoder.
|
|
31172
31172
|
* @param [tilesetOptions] - An object describing initialization options.
|
|
@@ -31770,9 +31770,9 @@ export enum DepthFunction {
|
|
|
31770
31770
|
|
|
31771
31771
|
/**
|
|
31772
31772
|
* Returns the type that the given class property has in a GLSL shader.
|
|
31773
|
-
|
|
31774
|
-
It returns the same string as `PropertyTextureProperty.prototype.getGlslType`
|
|
31775
|
-
for a property texture property with the given class property
|
|
31773
|
+
*
|
|
31774
|
+
* It returns the same string as `PropertyTextureProperty.prototype.getGlslType`
|
|
31775
|
+
* for a property texture property with the given class property
|
|
31776
31776
|
* @param classProperty - The class property
|
|
31777
31777
|
* @returns The GLSL shader type string for the property
|
|
31778
31778
|
*/
|
|
@@ -31780,8 +31780,8 @@ export function getGlslType(classProperty: MetadataClassProperty): string;
|
|
|
31780
31780
|
|
|
31781
31781
|
/**
|
|
31782
31782
|
* Returns a shader statement that applies the inverse of the
|
|
31783
|
-
value transform to the given value, based on the given offset
|
|
31784
|
-
and scale.
|
|
31783
|
+
* value transform to the given value, based on the given offset
|
|
31784
|
+
* and scale.
|
|
31785
31785
|
* @param input - The input value
|
|
31786
31786
|
* @param offset - The offset
|
|
31787
31787
|
* @param scale - The scale
|
|
@@ -31791,7 +31791,7 @@ export function unapplyValueTransform(input: string, offset: string, scale: stri
|
|
|
31791
31791
|
|
|
31792
31792
|
/**
|
|
31793
31793
|
* Returns a shader statement that applies the inverse of the
|
|
31794
|
-
normalization, based on the given component type
|
|
31794
|
+
* normalization, based on the given component type
|
|
31795
31795
|
* @param input - The input value
|
|
31796
31796
|
* @param componentType - The component type
|
|
31797
31797
|
* @returns The statement
|
|
@@ -31800,20 +31800,20 @@ export function unnormalize(input: string, componentType: string): string;
|
|
|
31800
31800
|
|
|
31801
31801
|
/**
|
|
31802
31802
|
* Creates a shader statement that returns the value of the specified
|
|
31803
|
-
property, normalized to the range [0, 1].
|
|
31803
|
+
* property, normalized to the range [0, 1].
|
|
31804
31804
|
* @param classProperty - The class property
|
|
31805
31805
|
* @param metadataProperty - The metadata property, either
|
|
31806
|
-
a `PropertyTextureProperty` or a `PropertyAttributeProperty`
|
|
31806
|
+
* a `PropertyTextureProperty` or a `PropertyAttributeProperty`
|
|
31807
31807
|
* @returns The string
|
|
31808
31808
|
*/
|
|
31809
31809
|
export function getSourceValueStringScalar(classProperty: MetadataClassProperty, metadataProperty: any): string;
|
|
31810
31810
|
|
|
31811
31811
|
/**
|
|
31812
31812
|
* Creates a shader statement that returns the value of the specified
|
|
31813
|
-
component of the given property, normalized to the range [0, 1].
|
|
31813
|
+
* component of the given property, normalized to the range [0, 1].
|
|
31814
31814
|
* @param classProperty - The class property
|
|
31815
31815
|
* @param metadataProperty - The metadata property, either
|
|
31816
|
-
a `PropertyTextureProperty` or a `PropertyAttributeProperty`
|
|
31816
|
+
* a `PropertyTextureProperty` or a `PropertyAttributeProperty`
|
|
31817
31817
|
* @param componentName - The name, in ["x", "y", "z", "w"]
|
|
31818
31818
|
* @returns The string
|
|
31819
31819
|
*/
|
|
@@ -32179,19 +32179,19 @@ export class EllipsoidSurfaceAppearance {
|
|
|
32179
32179
|
|
|
32180
32180
|
/**
|
|
32181
32181
|
* An expression for a style applied to a {@link Cesium3DTileset}.
|
|
32182
|
-
<p>
|
|
32183
|
-
Evaluates an expression defined using the
|
|
32184
|
-
{@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}.
|
|
32185
|
-
</p>
|
|
32186
|
-
<p>
|
|
32187
|
-
Implements the {@link StyleExpression} interface.
|
|
32188
|
-
</p>
|
|
32182
|
+
* <p>
|
|
32183
|
+
* Evaluates an expression defined using the
|
|
32184
|
+
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}.
|
|
32185
|
+
* </p>
|
|
32186
|
+
* <p>
|
|
32187
|
+
* Implements the {@link StyleExpression} interface.
|
|
32188
|
+
* </p>
|
|
32189
32189
|
* @example
|
|
32190
32190
|
* const expression = new Cesium.Expression('(regExp("^Chest").test(${County})) && (${YearBuilt} >= 1970)');
|
|
32191
|
-
expression.evaluate(feature); // returns true or false depending on the feature's properties
|
|
32191
|
+
* expression.evaluate(feature); // returns true or false depending on the feature's properties
|
|
32192
32192
|
* @example
|
|
32193
32193
|
* const expression = new Cesium.Expression('(${Temperature} > 90) ? color("red") : color("white")');
|
|
32194
|
-
expression.evaluateColor(feature, result); // returns a Cesium.Color object
|
|
32194
|
+
* expression.evaluateColor(feature, result); // returns a Cesium.Color object
|
|
32195
32195
|
* @param [expression] - The expression defined using the 3D Tiles Styling language.
|
|
32196
32196
|
* @param [defines] - Defines in the style.
|
|
32197
32197
|
*/
|
|
@@ -32203,13 +32203,13 @@ export class Expression {
|
|
|
32203
32203
|
readonly expression: string;
|
|
32204
32204
|
/**
|
|
32205
32205
|
* Evaluates the result of an expression, optionally using the provided feature's properties. If the result of
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32212
|
-
|
|
32206
|
+
* the expression in the
|
|
32207
|
+
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language}
|
|
32208
|
+
* is of type <code>Boolean</code>, <code>Number</code>, or <code>String</code>, the corresponding JavaScript
|
|
32209
|
+
* primitive type will be returned. If the result is a <code>RegExp</code>, a Javascript <code>RegExp</code>
|
|
32210
|
+
* object will be returned. If the result is a <code>Cartesian2</code>, <code>Cartesian3</code>, or <code>Cartesian4</code>,
|
|
32211
|
+
* a {@link Cartesian2}, {@link Cartesian3}, or {@link Cartesian4} object will be returned. If the <code>result</code> argument is
|
|
32212
|
+
* a {@link Color}, the {@link Cartesian4} value is converted to a {@link Color} and then returned.
|
|
32213
32213
|
* @param feature - The feature whose properties may be used as variables in the expression.
|
|
32214
32214
|
* @param [result] - The object onto which to store the result.
|
|
32215
32215
|
* @returns The result of evaluating the expression.
|
|
@@ -32217,9 +32217,9 @@ export class Expression {
|
|
|
32217
32217
|
evaluate(feature: Cesium3DTileFeature, result?: any): boolean | number | string | RegExp | Cartesian2 | Cartesian3 | Cartesian4 | Color;
|
|
32218
32218
|
/**
|
|
32219
32219
|
* Evaluates the result of a Color expression, optionally using the provided feature's properties.
|
|
32220
|
-
|
|
32221
|
-
|
|
32222
|
-
|
|
32220
|
+
* <p>
|
|
32221
|
+
* This is equivalent to {@link Expression#evaluate} but always returns a {@link Color} object.
|
|
32222
|
+
* </p>
|
|
32223
32223
|
* @param feature - The feature whose properties may be used as variables in the expression.
|
|
32224
32224
|
* @param [result] - The object in which to store the result
|
|
32225
32225
|
* @returns The modified result parameter or a new Color instance if one was not provided.
|
|
@@ -34644,24 +34644,24 @@ export class ImageryLayerCollection {
|
|
|
34644
34644
|
constructor();
|
|
34645
34645
|
/**
|
|
34646
34646
|
* An event that is raised when a layer is added to the collection. Event handlers are passed the layer that
|
|
34647
|
-
|
|
34647
|
+
* was added and the index at which it was added.
|
|
34648
34648
|
*/
|
|
34649
34649
|
layerAdded: Event;
|
|
34650
34650
|
/**
|
|
34651
34651
|
* An event that is raised when a layer is removed from the collection. Event handlers are passed the layer that
|
|
34652
|
-
|
|
34652
|
+
* was removed and the index from which it was removed.
|
|
34653
34653
|
*/
|
|
34654
34654
|
layerRemoved: Event;
|
|
34655
34655
|
/**
|
|
34656
34656
|
* An event that is raised when a layer changes position in the collection. Event handlers are passed the layer that
|
|
34657
|
-
|
|
34657
|
+
* was moved, its new index after the move, and its old index prior to the move.
|
|
34658
34658
|
*/
|
|
34659
34659
|
layerMoved: Event;
|
|
34660
34660
|
/**
|
|
34661
34661
|
* An event that is raised when a layer is shown or hidden by setting the
|
|
34662
|
-
|
|
34663
|
-
|
|
34664
|
-
|
|
34662
|
+
* {@link ImageryLayer#show} property. Event handlers are passed a reference to this layer,
|
|
34663
|
+
* the index of the layer in the collection, and a flag that is true if the layer is now
|
|
34664
|
+
* shown or false if it is now hidden.
|
|
34665
34665
|
*/
|
|
34666
34666
|
layerShownOrHidden: Event;
|
|
34667
34667
|
/**
|
|
@@ -34672,27 +34672,27 @@ export class ImageryLayerCollection {
|
|
|
34672
34672
|
* Adds a layer to the collection.
|
|
34673
34673
|
* @example
|
|
34674
34674
|
* const imageryLayer = Cesium.ImageryLayer.fromWorldImagery();
|
|
34675
|
-
|
|
34675
|
+
* scene.imageryLayers.add(imageryLayer);
|
|
34676
34676
|
* @example
|
|
34677
34677
|
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
|
|
34678
|
-
|
|
34678
|
+
* scene.imageryLayers.add(imageryLayer);
|
|
34679
34679
|
* @param layer - the layer to add.
|
|
34680
34680
|
* @param [index] - the index to add the layer at. If omitted, the layer will
|
|
34681
|
-
|
|
34681
|
+
* be added on top of all existing layers.
|
|
34682
34682
|
*/
|
|
34683
34683
|
add(layer: ImageryLayer, index?: number): void;
|
|
34684
34684
|
/**
|
|
34685
34685
|
* Creates a new layer using the given ImageryProvider and adds it to the collection.
|
|
34686
34686
|
* @example
|
|
34687
34687
|
* try {
|
|
34688
|
-
|
|
34689
|
-
|
|
34690
|
-
|
|
34691
|
-
|
|
34692
|
-
|
|
34688
|
+
* const provider = await Cesium.IonImageryProvider.fromAssetId(3812);
|
|
34689
|
+
* scene.imageryLayers.addImageryProvider(provider);
|
|
34690
|
+
* } catch (error) {
|
|
34691
|
+
* console.log(`There was an error creating the imagery layer. ${error}`)
|
|
34692
|
+
* }
|
|
34693
34693
|
* @param imageryProvider - the imagery provider to create a new layer for.
|
|
34694
34694
|
* @param [index] - the index to add the layer at. If omitted, the layer will
|
|
34695
|
-
|
|
34695
|
+
* added on top of all existing layers.
|
|
34696
34696
|
* @returns The newly created layer.
|
|
34697
34697
|
*/
|
|
34698
34698
|
addImageryProvider(imageryProvider: ImageryProvider, index?: number): ImageryLayer;
|
|
@@ -34701,7 +34701,7 @@ export class ImageryLayerCollection {
|
|
|
34701
34701
|
* @param layer - The layer to remove.
|
|
34702
34702
|
* @param [destroy = true] - whether to destroy the layers in addition to removing them.
|
|
34703
34703
|
* @returns true if the layer was in the collection and was removed,
|
|
34704
|
-
|
|
34704
|
+
* false if the layer was not in the collection.
|
|
34705
34705
|
*/
|
|
34706
34706
|
remove(layer: ImageryLayer, destroy?: boolean): boolean;
|
|
34707
34707
|
/**
|
|
@@ -34749,57 +34749,57 @@ export class ImageryLayerCollection {
|
|
|
34749
34749
|
lowerToBottom(layer: ImageryLayer): void;
|
|
34750
34750
|
/**
|
|
34751
34751
|
* Determines the imagery layers that are intersected by a pick ray. To compute a pick ray from a
|
|
34752
|
-
|
|
34752
|
+
* location on the screen, use {@link Camera.getPickRay}.
|
|
34753
34753
|
* @param ray - The ray to test for intersection.
|
|
34754
34754
|
* @param scene - The scene.
|
|
34755
34755
|
* @returns An array that includes all of
|
|
34756
|
-
|
|
34757
|
-
|
|
34756
|
+
* the layers that are intersected by a given pick ray. Undefined if
|
|
34757
|
+
* no layers are selected.
|
|
34758
34758
|
*/
|
|
34759
34759
|
pickImageryLayers(ray: Ray, scene: Scene): ImageryLayer[] | undefined;
|
|
34760
34760
|
/**
|
|
34761
34761
|
* Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery
|
|
34762
|
-
|
|
34763
|
-
|
|
34762
|
+
* layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
|
|
34763
|
+
* by the pick ray. To compute a pick ray from a location on the screen, use {@link Camera.getPickRay}.
|
|
34764
34764
|
* @example
|
|
34765
34765
|
* const pickRay = viewer.camera.getPickRay(windowPosition);
|
|
34766
|
-
|
|
34767
|
-
|
|
34768
|
-
|
|
34769
|
-
|
|
34770
|
-
|
|
34771
|
-
|
|
34772
|
-
|
|
34773
|
-
|
|
34774
|
-
|
|
34775
|
-
|
|
34776
|
-
|
|
34777
|
-
|
|
34766
|
+
* const featuresPromise = viewer.imageryLayers.pickImageryLayerFeatures(pickRay, viewer.scene);
|
|
34767
|
+
* if (!Cesium.defined(featuresPromise)) {
|
|
34768
|
+
* console.log('No features picked.');
|
|
34769
|
+
* } else {
|
|
34770
|
+
* Promise.resolve(featuresPromise).then(function(features) {
|
|
34771
|
+
* // This function is called asynchronously when the list if picked features is available.
|
|
34772
|
+
* console.log(`Number of features: ${features.length}`);
|
|
34773
|
+
* if (features.length > 0) {
|
|
34774
|
+
* console.log(`First feature name: ${features[0].name}`);
|
|
34775
|
+
* }
|
|
34776
|
+
* });
|
|
34777
|
+
* }
|
|
34778
34778
|
* @param ray - The ray to test for intersection.
|
|
34779
34779
|
* @param scene - The scene.
|
|
34780
34780
|
* @returns A promise that resolves to an array of features intersected by the pick ray.
|
|
34781
|
-
|
|
34782
|
-
|
|
34783
|
-
|
|
34784
|
-
|
|
34781
|
+
* If it can be quickly determined that no features are intersected (for example,
|
|
34782
|
+
* because no active imagery providers support {@link ImageryProvider#pickFeatures}
|
|
34783
|
+
* or because the pick ray does not intersect the surface), this function will
|
|
34784
|
+
* return undefined.
|
|
34785
34785
|
*/
|
|
34786
34786
|
pickImageryLayerFeatures(ray: Ray, scene: Scene): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
34787
34787
|
/**
|
|
34788
34788
|
* Returns true if this object was destroyed; otherwise, false.
|
|
34789
|
-
|
|
34790
|
-
|
|
34791
|
-
|
|
34789
|
+
* <br /><br />
|
|
34790
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
34791
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
34792
34792
|
* @returns true if this object was destroyed; otherwise, false.
|
|
34793
34793
|
*/
|
|
34794
34794
|
isDestroyed(): boolean;
|
|
34795
34795
|
/**
|
|
34796
34796
|
* Destroys the WebGL resources held by all layers in this collection. Explicitly destroying this
|
|
34797
|
-
|
|
34798
|
-
|
|
34799
|
-
|
|
34800
|
-
|
|
34801
|
-
|
|
34802
|
-
|
|
34797
|
+
* object allows for deterministic release of WebGL resources, instead of relying on the garbage
|
|
34798
|
+
* collector.
|
|
34799
|
+
* <br /><br />
|
|
34800
|
+
* Once this object is destroyed, it should not be used; calling any function other than
|
|
34801
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
34802
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
34803
34803
|
* @example
|
|
34804
34804
|
* layerCollection = layerCollection && layerCollection.destroy();
|
|
34805
34805
|
*/
|
|
@@ -35116,15 +35116,15 @@ export enum IonWorldImageryStyle {
|
|
|
35116
35116
|
export namespace ITwinData {
|
|
35117
35117
|
/**
|
|
35118
35118
|
* Create a {@link Cesium3DTileset} for the given iModel id using iTwin's Mesh Export API.
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35119
|
+
|
|
35120
|
+
If there is not a completed export available for the given iModel id, the returned promise will resolve to <code>undefined</code>.
|
|
35121
|
+
We recommend waiting 10-20 seconds and trying to load the tileset again.
|
|
35122
|
+
If all exports are Invalid this will throw an error.
|
|
35123
35123
|
* @example
|
|
35124
35124
|
* const tileset = await Cesium.ITwinData.createTilesetFromIModelId(iModelId);
|
|
35125
|
-
|
|
35126
|
-
|
|
35127
|
-
|
|
35125
|
+
if (Cesium.defined(tileset)) {
|
|
35126
|
+
viewer.scene.primitives.add(tileset);
|
|
35127
|
+
}
|
|
35128
35128
|
* @param iModelId - The id of the iModel to load
|
|
35129
35129
|
* @param [options] - Object containing options to pass to the internally created {@link Cesium3DTileset}.
|
|
35130
35130
|
* @returns A promise that will resolve to the created 3D tileset or <code>undefined</code> if there is no completed export for the given iModel id
|
|
@@ -35132,10 +35132,10 @@ export namespace ITwinData {
|
|
|
35132
35132
|
function createTilesetFromIModelId(iModelId: string, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset | undefined>;
|
|
35133
35133
|
/**
|
|
35134
35134
|
* Create a tileset for the specified reality data id. This function only works
|
|
35135
|
-
|
|
35136
|
-
|
|
35137
|
-
|
|
35138
|
-
|
|
35135
|
+
with 3D Tiles meshes and point clouds.
|
|
35136
|
+
|
|
35137
|
+
If the <code>type</code> or <code>rootDocument</code> are not provided this function
|
|
35138
|
+
will first request the full metadata for the specified reality data to fill these values.
|
|
35139
35139
|
* @param iTwinId - The id of the iTwin to load data from
|
|
35140
35140
|
* @param realityDataId - The id of the reality data to load
|
|
35141
35141
|
* @param [type] - The type of this reality data
|
|
@@ -35144,10 +35144,10 @@ export namespace ITwinData {
|
|
|
35144
35144
|
function createTilesetForRealityDataId(iTwinId: string, realityDataId: string, type?: ITwinPlatform.RealityDataType, rootDocument?: string): Promise<Cesium3DTileset>;
|
|
35145
35145
|
/**
|
|
35146
35146
|
* Create a data source of the correct type for the specified reality data id.
|
|
35147
|
-
|
|
35148
|
-
|
|
35149
|
-
|
|
35150
|
-
|
|
35147
|
+
This function only works for KML and GeoJSON type data.
|
|
35148
|
+
|
|
35149
|
+
If the <code>type</code> or <code>rootDocument</code> are not provided this function
|
|
35150
|
+
will first request the full metadata for the specified reality data to fill these values.
|
|
35151
35151
|
* @param iTwinId - The id of the iTwin to load data from
|
|
35152
35152
|
* @param realityDataId - The id of the reality data to load
|
|
35153
35153
|
* @param [type] - The type of this reality data
|
|
@@ -35995,216 +35995,216 @@ export enum MapMode2D {
|
|
|
35995
35995
|
|
|
35996
35996
|
/**
|
|
35997
35997
|
* A Material defines surface appearance through a combination of diffuse, specular,
|
|
35998
|
-
normal, emission, and alpha components. These values are specified using a
|
|
35999
|
-
JSON schema called Fabric which gets parsed and assembled into glsl shader code
|
|
36000
|
-
behind-the-scenes. Check out the {@link https://github.com/CesiumGS/cesium/wiki/Fabric|wiki page}
|
|
36001
|
-
for more details on Fabric.
|
|
36002
|
-
<br /><br />
|
|
36003
|
-
<style type="text/css">
|
|
36004
|
-
#materialDescriptions code {
|
|
36005
|
-
|
|
36006
|
-
|
|
36007
|
-
|
|
36008
|
-
}
|
|
36009
|
-
#materialDescriptions ul, #materialDescriptions ul ul {
|
|
36010
|
-
|
|
36011
|
-
}
|
|
36012
|
-
#materialDescriptions ul ul {
|
|
36013
|
-
|
|
36014
|
-
}
|
|
36015
|
-
#materialDescriptions ul ul li {
|
|
36016
|
-
|
|
36017
|
-
|
|
36018
|
-
|
|
36019
|
-
|
|
36020
|
-
}
|
|
36021
|
-
#materialDescriptions ul li {
|
|
36022
|
-
|
|
36023
|
-
|
|
36024
|
-
}
|
|
36025
|
-
</style>
|
|
36026
|
-
|
|
36027
|
-
Base material types and their uniforms:
|
|
36028
|
-
<div id='materialDescriptions'>
|
|
36029
|
-
<ul>
|
|
36030
|
-
<li>Color</li>
|
|
36031
|
-
<ul>
|
|
36032
|
-
|
|
36033
|
-
</ul>
|
|
36034
|
-
<li>Image</li>
|
|
36035
|
-
<ul>
|
|
36036
|
-
|
|
36037
|
-
|
|
36038
|
-
</ul>
|
|
36039
|
-
<li>DiffuseMap</li>
|
|
36040
|
-
<ul>
|
|
36041
|
-
|
|
36042
|
-
|
|
36043
|
-
|
|
36044
|
-
</ul>
|
|
36045
|
-
<li>AlphaMap</li>
|
|
36046
|
-
<ul>
|
|
36047
|
-
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
</ul>
|
|
36051
|
-
<li>SpecularMap</li>
|
|
36052
|
-
<ul>
|
|
36053
|
-
|
|
36054
|
-
|
|
36055
|
-
|
|
36056
|
-
</ul>
|
|
36057
|
-
<li>EmissionMap</li>
|
|
36058
|
-
<ul>
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
</ul>
|
|
36063
|
-
<li>BumpMap</li>
|
|
36064
|
-
<ul>
|
|
36065
|
-
|
|
36066
|
-
|
|
36067
|
-
|
|
36068
|
-
|
|
36069
|
-
</ul>
|
|
36070
|
-
<li>NormalMap</li>
|
|
36071
|
-
<ul>
|
|
36072
|
-
|
|
36073
|
-
|
|
36074
|
-
|
|
36075
|
-
|
|
36076
|
-
</ul>
|
|
36077
|
-
<li>Grid</li>
|
|
36078
|
-
<ul>
|
|
36079
|
-
|
|
36080
|
-
|
|
36081
|
-
|
|
36082
|
-
|
|
36083
|
-
|
|
36084
|
-
</ul>
|
|
36085
|
-
<li>Stripe</li>
|
|
36086
|
-
<ul>
|
|
36087
|
-
|
|
36088
|
-
|
|
36089
|
-
|
|
36090
|
-
|
|
36091
|
-
|
|
36092
|
-
</ul>
|
|
36093
|
-
<li>Checkerboard</li>
|
|
36094
|
-
<ul>
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36098
|
-
</ul>
|
|
36099
|
-
<li>Dot</li>
|
|
36100
|
-
<ul>
|
|
36101
|
-
|
|
36102
|
-
|
|
36103
|
-
|
|
36104
|
-
</ul>
|
|
36105
|
-
<li>Water</li>
|
|
36106
|
-
<ul>
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
</ul>
|
|
36116
|
-
<li>RimLighting</li>
|
|
36117
|
-
<ul>
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
</ul>
|
|
36122
|
-
<li>Fade</li>
|
|
36123
|
-
<ul>
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
</ul>
|
|
36131
|
-
<li>PolylineArrow</li>
|
|
36132
|
-
<ul>
|
|
36133
|
-
|
|
36134
|
-
</ul>
|
|
36135
|
-
<li>PolylineDash</li>
|
|
36136
|
-
<ul>
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
</ul>
|
|
36142
|
-
<li>PolylineGlow</li>
|
|
36143
|
-
<ul>
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
|
|
36147
|
-
</ul>
|
|
36148
|
-
<li>PolylineOutline</li>
|
|
36149
|
-
<ul>
|
|
36150
|
-
|
|
36151
|
-
|
|
36152
|
-
|
|
36153
|
-
</ul>
|
|
36154
|
-
<li>ElevationContour</li>
|
|
36155
|
-
<ul>
|
|
36156
|
-
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
</ul>
|
|
36160
|
-
<li>ElevationRamp</li>
|
|
36161
|
-
<ul>
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
</ul>
|
|
36166
|
-
<li>SlopeRamp</li>
|
|
36167
|
-
<ul>
|
|
36168
|
-
|
|
36169
|
-
</ul>
|
|
36170
|
-
<li>AspectRamp</li>
|
|
36171
|
-
<ul>
|
|
36172
|
-
|
|
36173
|
-
</ul>
|
|
36174
|
-
<li>ElevationBand</li>
|
|
36175
|
-
<ul>
|
|
36176
|
-
|
|
36177
|
-
|
|
36178
|
-
</ul>
|
|
36179
|
-
<li>WaterMask</li>
|
|
36180
|
-
<ul>
|
|
36181
|
-
|
|
36182
|
-
|
|
36183
|
-
</ul>
|
|
36184
|
-
</ul>
|
|
36185
|
-
</ul>
|
|
36186
|
-
</div>
|
|
35998
|
+
* normal, emission, and alpha components. These values are specified using a
|
|
35999
|
+
* JSON schema called Fabric which gets parsed and assembled into glsl shader code
|
|
36000
|
+
* behind-the-scenes. Check out the {@link https://github.com/CesiumGS/cesium/wiki/Fabric|wiki page}
|
|
36001
|
+
* for more details on Fabric.
|
|
36002
|
+
* <br /><br />
|
|
36003
|
+
* <style type="text/css">
|
|
36004
|
+
* #materialDescriptions code {
|
|
36005
|
+
* font-weight: normal;
|
|
36006
|
+
* font-family: Consolas, 'Lucida Console', Monaco, monospace;
|
|
36007
|
+
* color: #A35A00;
|
|
36008
|
+
* }
|
|
36009
|
+
* #materialDescriptions ul, #materialDescriptions ul ul {
|
|
36010
|
+
* list-style-type: none;
|
|
36011
|
+
* }
|
|
36012
|
+
* #materialDescriptions ul ul {
|
|
36013
|
+
* margin-bottom: 10px;
|
|
36014
|
+
* }
|
|
36015
|
+
* #materialDescriptions ul ul li {
|
|
36016
|
+
* font-weight: normal;
|
|
36017
|
+
* color: #000000;
|
|
36018
|
+
* text-indent: -2em;
|
|
36019
|
+
* margin-left: 2em;
|
|
36020
|
+
* }
|
|
36021
|
+
* #materialDescriptions ul li {
|
|
36022
|
+
* font-weight: bold;
|
|
36023
|
+
* color: #0053CF;
|
|
36024
|
+
* }
|
|
36025
|
+
* </style>
|
|
36026
|
+
*
|
|
36027
|
+
* Base material types and their uniforms:
|
|
36028
|
+
* <div id='materialDescriptions'>
|
|
36029
|
+
* <ul>
|
|
36030
|
+
* <li>Color</li>
|
|
36031
|
+
* <ul>
|
|
36032
|
+
* <li><code>color</code>: rgba color object.</li>
|
|
36033
|
+
* </ul>
|
|
36034
|
+
* <li>Image</li>
|
|
36035
|
+
* <ul>
|
|
36036
|
+
* <li><code>image</code>: path to image.</li>
|
|
36037
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36038
|
+
* </ul>
|
|
36039
|
+
* <li>DiffuseMap</li>
|
|
36040
|
+
* <ul>
|
|
36041
|
+
* <li><code>image</code>: path to image.</li>
|
|
36042
|
+
* <li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels.</li>
|
|
36043
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36044
|
+
* </ul>
|
|
36045
|
+
* <li>AlphaMap</li>
|
|
36046
|
+
* <ul>
|
|
36047
|
+
* <li><code>image</code>: path to image.</li>
|
|
36048
|
+
* <li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36049
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36050
|
+
* </ul>
|
|
36051
|
+
* <li>SpecularMap</li>
|
|
36052
|
+
* <ul>
|
|
36053
|
+
* <li><code>image</code>: path to image.</li>
|
|
36054
|
+
* <li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36055
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36056
|
+
* </ul>
|
|
36057
|
+
* <li>EmissionMap</li>
|
|
36058
|
+
* <ul>
|
|
36059
|
+
* <li><code>image</code>: path to image.</li>
|
|
36060
|
+
* <li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
|
|
36061
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36062
|
+
* </ul>
|
|
36063
|
+
* <li>BumpMap</li>
|
|
36064
|
+
* <ul>
|
|
36065
|
+
* <li><code>image</code>: path to image.</li>
|
|
36066
|
+
* <li><code>channel</code>: One character string containing r, g, b, or a for selecting the desired image channel. </li>
|
|
36067
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36068
|
+
* <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>
|
|
36069
|
+
* </ul>
|
|
36070
|
+
* <li>NormalMap</li>
|
|
36071
|
+
* <ul>
|
|
36072
|
+
* <li><code>image</code>: path to image.</li>
|
|
36073
|
+
* <li><code>channels</code>: Three character string containing any combination of r, g, b, and a for selecting the desired image channels. </li>
|
|
36074
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of times to repeat the image.</li>
|
|
36075
|
+
* <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>
|
|
36076
|
+
* </ul>
|
|
36077
|
+
* <li>Grid</li>
|
|
36078
|
+
* <ul>
|
|
36079
|
+
* <li><code>color</code>: rgba color object for the whole material.</li>
|
|
36080
|
+
* <li><code>cellAlpha</code>: Alpha value for the cells between grid lines. This will be combined with color.alpha.</li>
|
|
36081
|
+
* <li><code>lineCount</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
|
|
36082
|
+
* <li><code>lineThickness</code>: Object with x and y values specifying the thickness of grid lines (in pixels where available).</li>
|
|
36083
|
+
* <li><code>lineOffset</code>: Object with x and y values specifying the offset of grid lines (range is 0 to 1).</li>
|
|
36084
|
+
* </ul>
|
|
36085
|
+
* <li>Stripe</li>
|
|
36086
|
+
* <ul>
|
|
36087
|
+
* <li><code>horizontal</code>: Boolean that determines if the stripes are horizontal or vertical.</li>
|
|
36088
|
+
* <li><code>evenColor</code>: rgba color object for the stripe's first color.</li>
|
|
36089
|
+
* <li><code>oddColor</code>: rgba color object for the stripe's second color.</li>
|
|
36090
|
+
* <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>
|
|
36091
|
+
* <li><code>repeat</code>: Number that controls the total number of stripes, half light and half dark.</li>
|
|
36092
|
+
* </ul>
|
|
36093
|
+
* <li>Checkerboard</li>
|
|
36094
|
+
* <ul>
|
|
36095
|
+
* <li><code>lightColor</code>: rgba color object for the checkerboard's light alternating color.</li>
|
|
36096
|
+
* <li><code>darkColor</code>: rgba color object for the checkerboard's dark alternating color.</li>
|
|
36097
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of columns and rows respectively.</li>
|
|
36098
|
+
* </ul>
|
|
36099
|
+
* <li>Dot</li>
|
|
36100
|
+
* <ul>
|
|
36101
|
+
* <li><code>lightColor</code>: rgba color object for the dot color.</li>
|
|
36102
|
+
* <li><code>darkColor</code>: rgba color object for the background color.</li>
|
|
36103
|
+
* <li><code>repeat</code>: Object with x and y values specifying the number of columns and rows of dots respectively.</li>
|
|
36104
|
+
* </ul>
|
|
36105
|
+
* <li>Water</li>
|
|
36106
|
+
* <ul>
|
|
36107
|
+
* <li><code>baseWaterColor</code>: rgba color object base color of the water.</li>
|
|
36108
|
+
* <li><code>blendColor</code>: rgba color object used when blending from water to non-water areas.</li>
|
|
36109
|
+
* <li><code>specularMap</code>: Single channel texture used to indicate areas of water.</li>
|
|
36110
|
+
* <li><code>normalMap</code>: Normal map for water normal perturbation.</li>
|
|
36111
|
+
* <li><code>frequency</code>: Number that controls the number of waves.</li>
|
|
36112
|
+
* <li><code>animationSpeed</code>: Number that controls the animations speed of the water.</li>
|
|
36113
|
+
* <li><code>amplitude</code>: Number that controls the amplitude of water waves.</li>
|
|
36114
|
+
* <li><code>specularIntensity</code>: Number that controls the intensity of specular reflections.</li>
|
|
36115
|
+
* </ul>
|
|
36116
|
+
* <li>RimLighting</li>
|
|
36117
|
+
* <ul>
|
|
36118
|
+
* <li><code>color</code>: diffuse color and alpha.</li>
|
|
36119
|
+
* <li><code>rimColor</code>: diffuse color and alpha of the rim.</li>
|
|
36120
|
+
* <li><code>width</code>: Number that determines the rim's width.</li>
|
|
36121
|
+
* </ul>
|
|
36122
|
+
* <li>Fade</li>
|
|
36123
|
+
* <ul>
|
|
36124
|
+
* <li><code>fadeInColor</code>: diffuse color and alpha at <code>time</code></li>
|
|
36125
|
+
* <li><code>fadeOutColor</code>: diffuse color and alpha at <code>maximumDistance</code> from <code>time</code></li>
|
|
36126
|
+
* <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>
|
|
36127
|
+
* <li><code>repeat</code>: true if the fade should wrap around the texture coodinates.</li>
|
|
36128
|
+
* <li><code>fadeDirection</code>: Object with x and y values specifying if the fade should be in the x and y directions.</li>
|
|
36129
|
+
* <li><code>time</code>: Object with x and y values between 0.0 and 1.0 of the <code>fadeInColor</code> position</li>
|
|
36130
|
+
* </ul>
|
|
36131
|
+
* <li>PolylineArrow</li>
|
|
36132
|
+
* <ul>
|
|
36133
|
+
* <li><code>color</code>: diffuse color and alpha.</li>
|
|
36134
|
+
* </ul>
|
|
36135
|
+
* <li>PolylineDash</li>
|
|
36136
|
+
* <ul>
|
|
36137
|
+
* <li><code>color</code>: color for the line.</li>
|
|
36138
|
+
* <li><code>gapColor</code>: color for the gaps in the line.</li>
|
|
36139
|
+
* <li><code>dashLength</code>: Dash length in pixels.</li>
|
|
36140
|
+
* <li><code>dashPattern</code>: The 16 bit stipple pattern for the line..</li>
|
|
36141
|
+
* </ul>
|
|
36142
|
+
* <li>PolylineGlow</li>
|
|
36143
|
+
* <ul>
|
|
36144
|
+
* <li><code>color</code>: color and maximum alpha for the glow on the line.</li>
|
|
36145
|
+
* <li><code>glowPower</code>: strength of the glow, as a percentage of the total line width (less than 1.0).</li>
|
|
36146
|
+
* <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>
|
|
36147
|
+
* </ul>
|
|
36148
|
+
* <li>PolylineOutline</li>
|
|
36149
|
+
* <ul>
|
|
36150
|
+
* <li><code>color</code>: diffuse color and alpha for the interior of the line.</li>
|
|
36151
|
+
* <li><code>outlineColor</code>: diffuse color and alpha for the outline.</li>
|
|
36152
|
+
* <li><code>outlineWidth</code>: width of the outline in pixels.</li>
|
|
36153
|
+
* </ul>
|
|
36154
|
+
* <li>ElevationContour</li>
|
|
36155
|
+
* <ul>
|
|
36156
|
+
* <li><code>color</code>: color and alpha for the contour line.</li>
|
|
36157
|
+
* <li><code>spacing</code>: spacing for contour lines in meters.</li>
|
|
36158
|
+
* <li><code>width</code>: Number specifying the width of the grid lines in pixels.</li>
|
|
36159
|
+
* </ul>
|
|
36160
|
+
* <li>ElevationRamp</li>
|
|
36161
|
+
* <ul>
|
|
36162
|
+
* <li><code>image</code>: color ramp image to use for coloring the terrain.</li>
|
|
36163
|
+
* <li><code>minimumHeight</code>: minimum height for the ramp.</li>
|
|
36164
|
+
* <li><code>maximumHeight</code>: maximum height for the ramp.</li>
|
|
36165
|
+
* </ul>
|
|
36166
|
+
* <li>SlopeRamp</li>
|
|
36167
|
+
* <ul>
|
|
36168
|
+
* <li><code>image</code>: color ramp image to use for coloring the terrain by slope.</li>
|
|
36169
|
+
* </ul>
|
|
36170
|
+
* <li>AspectRamp</li>
|
|
36171
|
+
* <ul>
|
|
36172
|
+
* <li><code>image</code>: color ramp image to use for color the terrain by aspect.</li>
|
|
36173
|
+
* </ul>
|
|
36174
|
+
* <li>ElevationBand</li>
|
|
36175
|
+
* <ul>
|
|
36176
|
+
* <li><code>heights</code>: image of heights sorted from lowest to highest.</li>
|
|
36177
|
+
* <li><code>colors</code>: image of colors at the corresponding heights.</li>
|
|
36178
|
+
* </ul>
|
|
36179
|
+
* <li>WaterMask</li>
|
|
36180
|
+
* <ul>
|
|
36181
|
+
* <li><code>waterColor</code>: diffuse color and alpha for the areas covered by water.</li>
|
|
36182
|
+
* <li><code>landColor</code>: diffuse color and alpha for the areas covered by land.</li>
|
|
36183
|
+
* </ul>
|
|
36184
|
+
* </ul>
|
|
36185
|
+
* </ul>
|
|
36186
|
+
* </div>
|
|
36187
36187
|
* @example
|
|
36188
36188
|
* // Create a color material with fromType:
|
|
36189
|
-
polygon.material = Cesium.Material.fromType('Color');
|
|
36190
|
-
polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
|
|
36191
|
-
|
|
36192
|
-
// Create the default material:
|
|
36193
|
-
polygon.material = new Cesium.Material();
|
|
36194
|
-
|
|
36195
|
-
// Create a color material with full Fabric notation:
|
|
36196
|
-
polygon.material = new Cesium.Material({
|
|
36197
|
-
|
|
36198
|
-
|
|
36199
|
-
|
|
36200
|
-
|
|
36201
|
-
|
|
36202
|
-
|
|
36203
|
-
});
|
|
36189
|
+
* polygon.material = Cesium.Material.fromType('Color');
|
|
36190
|
+
* polygon.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
|
|
36191
|
+
*
|
|
36192
|
+
* // Create the default material:
|
|
36193
|
+
* polygon.material = new Cesium.Material();
|
|
36194
|
+
*
|
|
36195
|
+
* // Create a color material with full Fabric notation:
|
|
36196
|
+
* polygon.material = new Cesium.Material({
|
|
36197
|
+
* fabric: {
|
|
36198
|
+
* type: 'Color',
|
|
36199
|
+
* uniforms: {
|
|
36200
|
+
* color: new Cesium.Color(1.0, 1.0, 0.0, 1.0)
|
|
36201
|
+
* }
|
|
36202
|
+
* }
|
|
36203
|
+
* });
|
|
36204
36204
|
* @param [options] - Object with the following properties:
|
|
36205
36205
|
* @param [options.strict = false] - Throws errors for issues that would normally be ignored, including unused uniforms or materials.
|
|
36206
36206
|
* @param [options.translucent = true] - When <code>true</code> or a function that returns <code>true</code>, the geometry
|
|
36207
|
-
|
|
36207
|
+
* with this material is expected to appear translucent.
|
|
36208
36208
|
* @param [options.minificationFilter = TextureMinificationFilter.LINEAR] - The {@link TextureMinificationFilter} to apply to this material's textures.
|
|
36209
36209
|
* @param [options.magnificationFilter = TextureMagnificationFilter.LINEAR] - The {@link TextureMagnificationFilter} to apply to this material's textures.
|
|
36210
36210
|
* @param options.fabric - The fabric JSON used to generate the material.
|
|
@@ -36235,17 +36235,17 @@ export class Material {
|
|
|
36235
36235
|
uniforms: any;
|
|
36236
36236
|
/**
|
|
36237
36237
|
* When <code>true</code> or a function that returns <code>true</code>,
|
|
36238
|
-
|
|
36238
|
+
* the geometry is expected to appear translucent.
|
|
36239
36239
|
*/
|
|
36240
36240
|
translucent: boolean | ((...params: any[]) => any);
|
|
36241
36241
|
/**
|
|
36242
36242
|
* Creates a new material using an existing material type.
|
|
36243
|
-
|
|
36244
|
-
|
|
36243
|
+
* <br /><br />
|
|
36244
|
+
* Shorthand for: new Material({fabric : {type : type}});
|
|
36245
36245
|
* @example
|
|
36246
36246
|
* const material = Cesium.Material.fromType('Color', {
|
|
36247
|
-
|
|
36248
|
-
|
|
36247
|
+
* color: new Cesium.Color(1.0, 0.0, 0.0, 1.0)
|
|
36248
|
+
* });
|
|
36249
36249
|
* @param type - The base material type.
|
|
36250
36250
|
* @param [uniforms] - Overrides for the default uniforms.
|
|
36251
36251
|
* @returns New material object.
|
|
@@ -36258,19 +36258,19 @@ export class Material {
|
|
|
36258
36258
|
isTranslucent(): boolean;
|
|
36259
36259
|
/**
|
|
36260
36260
|
* Returns true if this object was destroyed; otherwise, false.
|
|
36261
|
-
|
|
36262
|
-
|
|
36263
|
-
|
|
36261
|
+
* <br /><br />
|
|
36262
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
36263
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
36264
36264
|
* @returns True if this object was destroyed; otherwise, false.
|
|
36265
36265
|
*/
|
|
36266
36266
|
isDestroyed(): boolean;
|
|
36267
36267
|
/**
|
|
36268
36268
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
36269
|
-
|
|
36270
|
-
|
|
36271
|
-
|
|
36272
|
-
|
|
36273
|
-
|
|
36269
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
36270
|
+
* <br /><br />
|
|
36271
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
36272
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
36273
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
36274
36274
|
* @example
|
|
36275
36275
|
* material = material && material.destroy();
|
|
36276
36276
|
*/
|
|
@@ -37022,55 +37022,55 @@ export type UniformSpecifier = {
|
|
|
37022
37022
|
|
|
37023
37023
|
/**
|
|
37024
37024
|
* A user defined GLSL shader used with {@link Model} as well
|
|
37025
|
-
as {@link Cesium3DTileset}.
|
|
37026
|
-
<p>
|
|
37027
|
-
If texture uniforms are used, additional resource management must be done:
|
|
37028
|
-
</p>
|
|
37029
|
-
<ul>
|
|
37030
|
-
|
|
37031
|
-
|
|
37032
|
-
|
|
37033
|
-
|
|
37034
|
-
|
|
37035
|
-
|
|
37036
|
-
|
|
37037
|
-
|
|
37038
|
-
|
|
37039
|
-
|
|
37040
|
-
</ul>
|
|
37041
|
-
<p>
|
|
37042
|
-
See the {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide} for more detailed documentation.
|
|
37043
|
-
</p>
|
|
37025
|
+
* as {@link Cesium3DTileset}.
|
|
37026
|
+
* <p>
|
|
37027
|
+
* If texture uniforms are used, additional resource management must be done:
|
|
37028
|
+
* </p>
|
|
37029
|
+
* <ul>
|
|
37030
|
+
* <li>
|
|
37031
|
+
* The <code>update</code> function must be called each frame. When a
|
|
37032
|
+
* custom shader is passed to a {@link Model} or a
|
|
37033
|
+
* {@link Cesium3DTileset}, this step is handled automaticaly
|
|
37034
|
+
* </li>
|
|
37035
|
+
* <li>
|
|
37036
|
+
* {@link CustomShader#destroy} must be called when the custom shader is
|
|
37037
|
+
* no longer needed to clean up GPU resources properly. The application
|
|
37038
|
+
* is responsible for calling this method.
|
|
37039
|
+
* </li>
|
|
37040
|
+
* </ul>
|
|
37041
|
+
* <p>
|
|
37042
|
+
* See the {@link https://github.com/CesiumGS/cesium/tree/main/Documentation/CustomShaderGuide|Custom Shader Guide} for more detailed documentation.
|
|
37043
|
+
* </p>
|
|
37044
37044
|
* @example
|
|
37045
37045
|
* 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
|
-
});
|
|
37046
|
+
* uniforms: {
|
|
37047
|
+
* u_colorIndex: {
|
|
37048
|
+
* type: Cesium.UniformType.FLOAT,
|
|
37049
|
+
* value: 1.0
|
|
37050
|
+
* },
|
|
37051
|
+
* u_normalMap: {
|
|
37052
|
+
* type: Cesium.UniformType.SAMPLER_2D,
|
|
37053
|
+
* value: new Cesium.TextureUniform({
|
|
37054
|
+
* url: "http://example.com/normal.png"
|
|
37055
|
+
* })
|
|
37056
|
+
* }
|
|
37057
|
+
* },
|
|
37058
|
+
* varyings: {
|
|
37059
|
+
* v_selectedColor: Cesium.VaryingType.VEC3
|
|
37060
|
+
* },
|
|
37061
|
+
* vertexShaderText: `
|
|
37062
|
+
* void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
|
|
37063
|
+
* v_selectedColor = mix(vsInput.attributes.color_0, vsInput.attributes.color_1, u_colorIndex);
|
|
37064
|
+
* vsOutput.positionMC += 0.1 * vsInput.attributes.normal;
|
|
37065
|
+
* }
|
|
37066
|
+
* `,
|
|
37067
|
+
* fragmentShaderText: `
|
|
37068
|
+
* void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
|
|
37069
|
+
* material.normal = texture(u_normalMap, fsInput.attributes.texCoord_0);
|
|
37070
|
+
* material.diffuse = v_selectedColor;
|
|
37071
|
+
* }
|
|
37072
|
+
* `
|
|
37073
|
+
* });
|
|
37074
37074
|
* @param options - An object with the following options
|
|
37075
37075
|
* @param [options.mode = CustomShaderMode.MODIFY_MATERIAL] - The custom shader mode, which determines how the custom shader code is inserted into the fragment shader.
|
|
37076
37076
|
* @param [options.lightingModel] - The lighting model (e.g. PBR or unlit). If present, this overrides the default lighting for the model.
|
|
@@ -37096,12 +37096,12 @@ export class CustomShader {
|
|
|
37096
37096
|
});
|
|
37097
37097
|
/**
|
|
37098
37098
|
* A value determining how the custom shader interacts with the overall
|
|
37099
|
-
|
|
37099
|
+
* fragment shader. This is used by {@link CustomShaderPipelineStage}
|
|
37100
37100
|
*/
|
|
37101
37101
|
readonly mode: CustomShaderMode;
|
|
37102
37102
|
/**
|
|
37103
37103
|
* The lighting model to use when using the custom shader.
|
|
37104
|
-
|
|
37104
|
+
* This is used by {@link CustomShaderPipelineStage}
|
|
37105
37105
|
*/
|
|
37106
37106
|
readonly lightingModel: LightingModel;
|
|
37107
37107
|
/**
|
|
@@ -37112,7 +37112,7 @@ export class CustomShader {
|
|
|
37112
37112
|
};
|
|
37113
37113
|
/**
|
|
37114
37114
|
* Additional varyings as declared by the user.
|
|
37115
|
-
|
|
37115
|
+
* This is used by {@link CustomShaderPipelineStage}
|
|
37116
37116
|
*/
|
|
37117
37117
|
readonly varyings: {
|
|
37118
37118
|
[key: string]: VaryingType;
|
|
@@ -37127,9 +37127,9 @@ export class CustomShader {
|
|
|
37127
37127
|
readonly fragmentShaderText: string;
|
|
37128
37128
|
/**
|
|
37129
37129
|
* The translucency mode, which determines how the custom shader will be applied. If the value is
|
|
37130
|
-
|
|
37131
|
-
|
|
37132
|
-
|
|
37130
|
+
* CustomShaderTransulcencyMode.OPAQUE or CustomShaderTransulcencyMode.TRANSLUCENT, the custom shader
|
|
37131
|
+
* will override settings from the model's material. If the value isCustomShaderTransulcencyMode.INHERIT,
|
|
37132
|
+
* the custom shader will render as either opaque or translucent depending on the primitive's material settings.
|
|
37133
37133
|
*/
|
|
37134
37134
|
readonly translucencyMode: CustomShaderTranslucencyMode;
|
|
37135
37135
|
/**
|
|
@@ -37138,6 +37138,25 @@ export class CustomShader {
|
|
|
37138
37138
|
* @param value - The new value of the uniform.
|
|
37139
37139
|
*/
|
|
37140
37140
|
setUniform(uniformName: string, value: boolean | number | Cartesian2 | Cartesian3 | Cartesian4 | Matrix2 | Matrix3 | Matrix4 | string | Resource | TextureUniform): void;
|
|
37141
|
+
/**
|
|
37142
|
+
* Returns true if this object was destroyed; otherwise, false.
|
|
37143
|
+
* <br /><br />
|
|
37144
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
37145
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
37146
|
+
* @returns True if this object was destroyed; otherwise, false.
|
|
37147
|
+
*/
|
|
37148
|
+
isDestroyed(): boolean;
|
|
37149
|
+
/**
|
|
37150
|
+
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
37151
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
37152
|
+
* <br /><br />
|
|
37153
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
37154
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
37155
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
37156
|
+
* @example
|
|
37157
|
+
* customShader = customShader && customShader.destroy();
|
|
37158
|
+
*/
|
|
37159
|
+
destroy(): void;
|
|
37141
37160
|
}
|
|
37142
37161
|
|
|
37143
37162
|
/**
|
|
@@ -40695,88 +40714,88 @@ export enum PostProcessStageSampleMode {
|
|
|
40695
40714
|
|
|
40696
40715
|
/**
|
|
40697
40716
|
* A primitive represents geometry in the {@link Scene}. The geometry can be from a single {@link GeometryInstance}
|
|
40698
|
-
as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
40699
|
-
geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
40700
|
-
<p>
|
|
40701
|
-
A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
40702
|
-
{@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
40703
|
-
and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
40704
|
-
and match most of them and add a new geometry or appearance independently of each other.
|
|
40705
|
-
</p>
|
|
40706
|
-
<p>
|
|
40707
|
-
Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
40708
|
-
Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
40709
|
-
per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
40710
|
-
</p>
|
|
40711
|
-
<p>
|
|
40712
|
-
{@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
40713
|
-
show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
40714
|
-
shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
40715
|
-
</p>
|
|
40717
|
+
* as shown in example 1 below, or from an array of instances, even if the geometry is from different
|
|
40718
|
+
* geometry types, e.g., an {@link RectangleGeometry} and an {@link EllipsoidGeometry} as shown in Code Example 2.
|
|
40719
|
+
* <p>
|
|
40720
|
+
* A primitive combines geometry instances with an {@link Appearance} that describes the full shading, including
|
|
40721
|
+
* {@link Material} and {@link RenderState}. Roughly, the geometry instance defines the structure and placement,
|
|
40722
|
+
* and the appearance defines the visual characteristics. Decoupling geometry and appearance allows us to mix
|
|
40723
|
+
* and match most of them and add a new geometry or appearance independently of each other.
|
|
40724
|
+
* </p>
|
|
40725
|
+
* <p>
|
|
40726
|
+
* Combining multiple instances into one primitive is called batching, and significantly improves performance for static data.
|
|
40727
|
+
* Instances can be individually picked; {@link Scene#pick} returns their {@link GeometryInstance#id}. Using
|
|
40728
|
+
* per-instance appearances like {@link PerInstanceColorAppearance}, each instance can also have a unique color.
|
|
40729
|
+
* </p>
|
|
40730
|
+
* <p>
|
|
40731
|
+
* {@link Geometry} can either be created and batched on a web worker or the main thread. The first two examples
|
|
40732
|
+
* show geometry that will be created on a web worker by using the descriptions of the geometry. The third example
|
|
40733
|
+
* shows how to create the geometry on the main thread by explicitly calling the <code>createGeometry</code> method.
|
|
40734
|
+
* </p>
|
|
40716
40735
|
* @example
|
|
40717
40736
|
* // 1. Draw a translucent ellipse on the surface with a checkerboard pattern
|
|
40718
|
-
const instance = new Cesium.GeometryInstance({
|
|
40719
|
-
|
|
40720
|
-
|
|
40721
|
-
|
|
40722
|
-
|
|
40723
|
-
|
|
40724
|
-
|
|
40725
|
-
|
|
40726
|
-
|
|
40727
|
-
});
|
|
40728
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
40729
|
-
|
|
40730
|
-
|
|
40731
|
-
|
|
40732
|
-
|
|
40733
|
-
}));
|
|
40737
|
+
* const instance = new Cesium.GeometryInstance({
|
|
40738
|
+
* geometry : new Cesium.EllipseGeometry({
|
|
40739
|
+
* center : Cesium.Cartesian3.fromDegrees(-100.0, 20.0),
|
|
40740
|
+
* semiMinorAxis : 500000.0,
|
|
40741
|
+
* semiMajorAxis : 1000000.0,
|
|
40742
|
+
* rotation : Cesium.Math.PI_OVER_FOUR,
|
|
40743
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_ST
|
|
40744
|
+
* }),
|
|
40745
|
+
* id : 'object returned when this instance is picked and to get/set per-instance attributes'
|
|
40746
|
+
* });
|
|
40747
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
40748
|
+
* geometryInstances : instance,
|
|
40749
|
+
* appearance : new Cesium.EllipsoidSurfaceAppearance({
|
|
40750
|
+
* material : Cesium.Material.fromType('Checkerboard')
|
|
40751
|
+
* })
|
|
40752
|
+
* }));
|
|
40734
40753
|
* @example
|
|
40735
40754
|
* // 2. Draw different instances each with a unique color
|
|
40736
|
-
const rectangleInstance = new Cesium.GeometryInstance({
|
|
40737
|
-
|
|
40738
|
-
|
|
40739
|
-
|
|
40740
|
-
|
|
40741
|
-
|
|
40742
|
-
|
|
40743
|
-
|
|
40744
|
-
|
|
40745
|
-
});
|
|
40746
|
-
const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
40747
|
-
|
|
40748
|
-
|
|
40749
|
-
|
|
40750
|
-
|
|
40751
|
-
|
|
40752
|
-
|
|
40753
|
-
|
|
40754
|
-
|
|
40755
|
-
|
|
40756
|
-
|
|
40757
|
-
});
|
|
40758
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
40759
|
-
|
|
40760
|
-
|
|
40761
|
-
}));
|
|
40755
|
+
* const rectangleInstance = new Cesium.GeometryInstance({
|
|
40756
|
+
* geometry : new Cesium.RectangleGeometry({
|
|
40757
|
+
* rectangle : Cesium.Rectangle.fromDegrees(-140.0, 30.0, -100.0, 40.0),
|
|
40758
|
+
* vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
|
|
40759
|
+
* }),
|
|
40760
|
+
* id : 'rectangle',
|
|
40761
|
+
* attributes : {
|
|
40762
|
+
* color : new Cesium.ColorGeometryInstanceAttribute(0.0, 1.0, 1.0, 0.5)
|
|
40763
|
+
* }
|
|
40764
|
+
* });
|
|
40765
|
+
* const ellipsoidInstance = new Cesium.GeometryInstance({
|
|
40766
|
+
* geometry : new Cesium.EllipsoidGeometry({
|
|
40767
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
40768
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
40769
|
+
* }),
|
|
40770
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
40771
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
40772
|
+
* id : 'ellipsoid',
|
|
40773
|
+
* attributes : {
|
|
40774
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
40775
|
+
* }
|
|
40776
|
+
* });
|
|
40777
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
40778
|
+
* geometryInstances : [rectangleInstance, ellipsoidInstance],
|
|
40779
|
+
* appearance : new Cesium.PerInstanceColorAppearance()
|
|
40780
|
+
* }));
|
|
40762
40781
|
* @example
|
|
40763
40782
|
* // 3. Create the geometry on the main thread.
|
|
40764
|
-
scene.primitives.add(new Cesium.Primitive({
|
|
40765
|
-
|
|
40766
|
-
|
|
40767
|
-
|
|
40768
|
-
|
|
40769
|
-
|
|
40770
|
-
|
|
40771
|
-
|
|
40772
|
-
|
|
40773
|
-
|
|
40774
|
-
|
|
40775
|
-
|
|
40776
|
-
|
|
40777
|
-
|
|
40778
|
-
|
|
40779
|
-
}));
|
|
40783
|
+
* scene.primitives.add(new Cesium.Primitive({
|
|
40784
|
+
* geometryInstances : new Cesium.GeometryInstance({
|
|
40785
|
+
* geometry : Cesium.EllipsoidGeometry.createGeometry(new Cesium.EllipsoidGeometry({
|
|
40786
|
+
* radii : new Cesium.Cartesian3(500000.0, 500000.0, 1000000.0),
|
|
40787
|
+
* vertexFormat : Cesium.VertexFormat.POSITION_AND_NORMAL
|
|
40788
|
+
* })),
|
|
40789
|
+
* modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
|
|
40790
|
+
* Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 500000.0), new Cesium.Matrix4()),
|
|
40791
|
+
* id : 'ellipsoid',
|
|
40792
|
+
* attributes : {
|
|
40793
|
+
* color : Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.AQUA)
|
|
40794
|
+
* }
|
|
40795
|
+
* }),
|
|
40796
|
+
* appearance : new Cesium.PerInstanceColorAppearance(),
|
|
40797
|
+
* asynchronous : false
|
|
40798
|
+
* }));
|
|
40780
40799
|
* @param [options] - Object with the following properties:
|
|
40781
40800
|
* @param [options.geometryInstances] - The geometry instances - or a single geometry instance - to render.
|
|
40782
40801
|
* @param [options.appearance] - The appearance used to render the primitive.
|
|
@@ -40812,67 +40831,67 @@ export class Primitive {
|
|
|
40812
40831
|
});
|
|
40813
40832
|
/**
|
|
40814
40833
|
* The geometry instances rendered with this primitive. This may
|
|
40815
|
-
|
|
40816
|
-
|
|
40817
|
-
|
|
40818
|
-
|
|
40819
|
-
|
|
40834
|
+
* be <code>undefined</code> if <code>options.releaseGeometryInstances</code>
|
|
40835
|
+
* is <code>true</code> when the primitive is constructed.
|
|
40836
|
+
* <p>
|
|
40837
|
+
* Changing this property after the primitive is rendered has no effect.
|
|
40838
|
+
* </p>
|
|
40820
40839
|
*/
|
|
40821
40840
|
readonly geometryInstances: GeometryInstance[] | GeometryInstance;
|
|
40822
40841
|
/**
|
|
40823
40842
|
* The {@link Appearance} used to shade this primitive. Each geometry
|
|
40824
|
-
|
|
40825
|
-
|
|
40826
|
-
|
|
40843
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
40844
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
40845
|
+
* properties.
|
|
40827
40846
|
*/
|
|
40828
40847
|
appearance: Appearance;
|
|
40829
40848
|
/**
|
|
40830
40849
|
* The {@link Appearance} used to shade this primitive when it fails the depth test. Each geometry
|
|
40831
|
-
|
|
40832
|
-
|
|
40833
|
-
|
|
40834
|
-
|
|
40835
|
-
|
|
40836
|
-
|
|
40837
|
-
|
|
40838
|
-
|
|
40839
|
-
|
|
40840
|
-
|
|
40841
|
-
|
|
40842
|
-
|
|
40843
|
-
|
|
40850
|
+
* instance is shaded with the same appearance. Some appearances, like
|
|
40851
|
+
* {@link PerInstanceColorAppearance} allow giving each instance unique
|
|
40852
|
+
* properties.
|
|
40853
|
+
*
|
|
40854
|
+
* <p>
|
|
40855
|
+
* When using an appearance that requires a color attribute, like PerInstanceColorAppearance,
|
|
40856
|
+
* add a depthFailColor per-instance attribute instead.
|
|
40857
|
+
* </p>
|
|
40858
|
+
*
|
|
40859
|
+
* <p>
|
|
40860
|
+
* Requires the EXT_frag_depth WebGL extension to render properly. If the extension is not supported,
|
|
40861
|
+
* there may be artifacts.
|
|
40862
|
+
* </p>
|
|
40844
40863
|
*/
|
|
40845
40864
|
depthFailAppearance: Appearance;
|
|
40846
40865
|
/**
|
|
40847
40866
|
* The 4x4 transformation matrix that transforms the primitive (all geometry instances) from model to world coordinates.
|
|
40848
|
-
|
|
40849
|
-
|
|
40850
|
-
|
|
40851
|
-
|
|
40852
|
-
|
|
40853
|
-
|
|
40854
|
-
|
|
40867
|
+
* When this is the identity matrix, the primitive is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
40868
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
40869
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
40870
|
+
*
|
|
40871
|
+
* <p>
|
|
40872
|
+
* This property is only supported in 3D mode.
|
|
40873
|
+
* </p>
|
|
40855
40874
|
* @example
|
|
40856
40875
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
40857
|
-
|
|
40876
|
+
* p.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
40858
40877
|
*/
|
|
40859
40878
|
modelMatrix: Matrix4;
|
|
40860
40879
|
/**
|
|
40861
40880
|
* Determines if the primitive will be shown. This affects all geometry
|
|
40862
|
-
|
|
40881
|
+
* instances in the primitive.
|
|
40863
40882
|
*/
|
|
40864
40883
|
show: boolean;
|
|
40865
40884
|
/**
|
|
40866
40885
|
* When <code>true</code>, the renderer frustum culls and horizon culls the primitive's commands
|
|
40867
|
-
|
|
40868
|
-
|
|
40886
|
+
* based on their bounding volume. Set this to <code>false</code> for a small performance gain
|
|
40887
|
+
* if you are manually culling the primitive.
|
|
40869
40888
|
*/
|
|
40870
40889
|
cull: boolean;
|
|
40871
40890
|
/**
|
|
40872
40891
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
40873
|
-
|
|
40874
|
-
|
|
40875
|
-
|
|
40892
|
+
* <p>
|
|
40893
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
40894
|
+
* </p>
|
|
40876
40895
|
*/
|
|
40877
40896
|
debugShowBoundingVolume: boolean;
|
|
40878
40897
|
/**
|
|
@@ -40905,60 +40924,60 @@ export class Primitive {
|
|
|
40905
40924
|
readonly compressVertices: boolean;
|
|
40906
40925
|
/**
|
|
40907
40926
|
* Determines if the primitive is complete and ready to render. If this property is
|
|
40908
|
-
|
|
40909
|
-
|
|
40927
|
+
* true, the primitive will be rendered the next time that {@link Primitive#update}
|
|
40928
|
+
* is called.
|
|
40910
40929
|
* @example
|
|
40911
40930
|
* // Wait for a primitive to become ready before accessing attributes
|
|
40912
|
-
|
|
40913
|
-
|
|
40914
|
-
|
|
40915
|
-
|
|
40916
|
-
|
|
40917
|
-
|
|
40918
|
-
|
|
40919
|
-
|
|
40920
|
-
|
|
40921
|
-
|
|
40931
|
+
* const removeListener = scene.postRender.addEventListener(() => {
|
|
40932
|
+
* if (!frustumPrimitive.ready) {
|
|
40933
|
+
* return;
|
|
40934
|
+
* }
|
|
40935
|
+
*
|
|
40936
|
+
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
40937
|
+
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
40938
|
+
*
|
|
40939
|
+
* removeListener();
|
|
40940
|
+
* });
|
|
40922
40941
|
*/
|
|
40923
40942
|
readonly ready: boolean;
|
|
40924
40943
|
/**
|
|
40925
40944
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
40926
|
-
|
|
40927
|
-
|
|
40928
|
-
|
|
40929
|
-
|
|
40930
|
-
|
|
40945
|
+
* get the draw commands needed to render this primitive.
|
|
40946
|
+
* <p>
|
|
40947
|
+
* Do not call this function directly. This is documented just to
|
|
40948
|
+
* list the exceptions that may be propagated when the scene is rendered:
|
|
40949
|
+
* </p>
|
|
40931
40950
|
*/
|
|
40932
40951
|
update(): void;
|
|
40933
40952
|
/**
|
|
40934
40953
|
* Returns the modifiable per-instance attributes for a {@link GeometryInstance}.
|
|
40935
40954
|
* @example
|
|
40936
40955
|
* const attributes = primitive.getGeometryInstanceAttributes('an id');
|
|
40937
|
-
|
|
40938
|
-
|
|
40939
|
-
|
|
40940
|
-
|
|
40956
|
+
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA);
|
|
40957
|
+
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true);
|
|
40958
|
+
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(100.0, 10000.0);
|
|
40959
|
+
* attributes.offset = Cesium.OffsetGeometryInstanceAttribute.toValue(Cartesian3.IDENTITY);
|
|
40941
40960
|
* @param id - The id of the {@link GeometryInstance}.
|
|
40942
40961
|
* @returns The typed array in the attribute's format or undefined if the is no instance with id.
|
|
40943
40962
|
*/
|
|
40944
40963
|
getGeometryInstanceAttributes(id: any): any;
|
|
40945
40964
|
/**
|
|
40946
40965
|
* Returns true if this object was destroyed; otherwise, false.
|
|
40947
|
-
|
|
40948
|
-
|
|
40949
|
-
|
|
40950
|
-
|
|
40966
|
+
* <p>
|
|
40967
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
40968
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
40969
|
+
* </p>
|
|
40951
40970
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
40952
40971
|
*/
|
|
40953
40972
|
isDestroyed(): boolean;
|
|
40954
40973
|
/**
|
|
40955
40974
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
40956
|
-
|
|
40957
|
-
|
|
40958
|
-
|
|
40959
|
-
|
|
40960
|
-
|
|
40961
|
-
|
|
40975
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
40976
|
+
* <p>
|
|
40977
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
40978
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
40979
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
40980
|
+
* </p>
|
|
40962
40981
|
* @example
|
|
40963
40982
|
* e = e && e.destroy();
|
|
40964
40983
|
*/
|
|
@@ -41121,15 +41140,15 @@ export class PrimitiveCollection {
|
|
|
41121
41140
|
|
|
41122
41141
|
/**
|
|
41123
41142
|
* The container for all 3D graphical objects and state in a Cesium virtual scene. Generally,
|
|
41124
|
-
a scene is not created directly; instead, it is implicitly created by {@link CesiumWidget}.
|
|
41143
|
+
* a scene is not created directly; instead, it is implicitly created by {@link CesiumWidget}.
|
|
41125
41144
|
* @example
|
|
41126
41145
|
* // Create scene without anisotropic texture filtering
|
|
41127
|
-
const scene = new Cesium.Scene({
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41131
|
-
|
|
41132
|
-
});
|
|
41146
|
+
* const scene = new Cesium.Scene({
|
|
41147
|
+
* canvas : canvas,
|
|
41148
|
+
* contextOptions : {
|
|
41149
|
+
* allowTextureFilterAnisotropic : false
|
|
41150
|
+
* }
|
|
41151
|
+
* });
|
|
41133
41152
|
* @param options - Object with the following properties:
|
|
41134
41153
|
* @param options.canvas - The HTML canvas element to create the scene for.
|
|
41135
41154
|
* @param [options.contextOptions] - Context and WebGL creation properties.
|
|
@@ -41165,14 +41184,14 @@ export class Scene {
|
|
|
41165
41184
|
});
|
|
41166
41185
|
/**
|
|
41167
41186
|
* Exceptions occurring in <code>render</code> are always caught in order to raise the
|
|
41168
|
-
|
|
41169
|
-
|
|
41170
|
-
|
|
41187
|
+
* <code>renderError</code> event. If this property is true, the error is rethrown
|
|
41188
|
+
* after the event is raised. If this property is false, the <code>render</code> function
|
|
41189
|
+
* returns normally after raising the event.
|
|
41171
41190
|
*/
|
|
41172
41191
|
rethrowRenderErrors: boolean;
|
|
41173
41192
|
/**
|
|
41174
41193
|
* Determines whether or not to instantly complete the
|
|
41175
|
-
|
|
41194
|
+
* scene transition animation on user input.
|
|
41176
41195
|
*/
|
|
41177
41196
|
completeMorphOnUserInput: boolean;
|
|
41178
41197
|
/**
|
|
@@ -41209,106 +41228,106 @@ export class Scene {
|
|
|
41209
41228
|
backgroundColor: Color;
|
|
41210
41229
|
/**
|
|
41211
41230
|
* The current morph transition time between 2D/Columbus View and 3D,
|
|
41212
|
-
|
|
41231
|
+
* with 0.0 being 2D or Columbus View and 1.0 being 3D.
|
|
41213
41232
|
*/
|
|
41214
41233
|
morphTime: number;
|
|
41215
41234
|
/**
|
|
41216
41235
|
* The far-to-near ratio of the multi-frustum when using a normal depth buffer.
|
|
41217
|
-
|
|
41218
|
-
|
|
41219
|
-
|
|
41220
|
-
|
|
41221
|
-
|
|
41236
|
+
* <p>
|
|
41237
|
+
* This value is used to create the near and far values for each frustum of the multi-frustum. It is only used
|
|
41238
|
+
* when {@link Scene#logarithmicDepthBuffer} is <code>false</code>. When <code>logarithmicDepthBuffer</code> is
|
|
41239
|
+
* <code>true</code>, use {@link Scene#logarithmicDepthFarToNearRatio}.
|
|
41240
|
+
* </p>
|
|
41222
41241
|
*/
|
|
41223
41242
|
farToNearRatio: number;
|
|
41224
41243
|
/**
|
|
41225
41244
|
* The far-to-near ratio of the multi-frustum when using a logarithmic depth buffer.
|
|
41226
|
-
|
|
41227
|
-
|
|
41228
|
-
|
|
41229
|
-
|
|
41230
|
-
|
|
41245
|
+
* <p>
|
|
41246
|
+
* This value is used to create the near and far values for each frustum of the multi-frustum. It is only used
|
|
41247
|
+
* when {@link Scene#logarithmicDepthBuffer} is <code>true</code>. When <code>logarithmicDepthBuffer</code> is
|
|
41248
|
+
* <code>false</code>, use {@link Scene#farToNearRatio}.
|
|
41249
|
+
* </p>
|
|
41231
41250
|
*/
|
|
41232
41251
|
logarithmicDepthFarToNearRatio: number;
|
|
41233
41252
|
/**
|
|
41234
41253
|
* Determines the uniform depth size in meters of each frustum of the multifrustum in 2D. If a primitive or model close
|
|
41235
|
-
|
|
41236
|
-
|
|
41254
|
+
* to the surface shows z-fighting, decreasing this will eliminate the artifact, but decrease performance. On the
|
|
41255
|
+
* other hand, increasing this will increase performance but may cause z-fighting among primitives close to the surface.
|
|
41237
41256
|
*/
|
|
41238
41257
|
nearToFarDistance2D: number;
|
|
41239
41258
|
/**
|
|
41240
41259
|
* The vertical exaggeration of the scene.
|
|
41241
|
-
|
|
41260
|
+
* When set to 1.0, no exaggeration is applied.
|
|
41242
41261
|
*/
|
|
41243
41262
|
verticalExaggeration: number;
|
|
41244
41263
|
/**
|
|
41245
41264
|
* The reference height for vertical exaggeration of the scene.
|
|
41246
|
-
|
|
41265
|
+
* When set to 0.0, the exaggeration is applied relative to the ellipsoid surface.
|
|
41247
41266
|
*/
|
|
41248
41267
|
verticalExaggerationRelativeHeight: number;
|
|
41249
41268
|
/**
|
|
41250
41269
|
* This property is for debugging only; it is not for production use.
|
|
41251
|
-
|
|
41252
|
-
|
|
41253
|
-
|
|
41254
|
-
|
|
41255
|
-
|
|
41256
|
-
|
|
41257
|
-
|
|
41258
|
-
|
|
41270
|
+
* <p>
|
|
41271
|
+
* A function that determines what commands are executed. As shown in the examples below,
|
|
41272
|
+
* the function receives the command's <code>owner</code> as an argument, and returns a boolean indicating if the
|
|
41273
|
+
* command should be executed.
|
|
41274
|
+
* </p>
|
|
41275
|
+
* <p>
|
|
41276
|
+
* The default is <code>undefined</code>, indicating that all commands are executed.
|
|
41277
|
+
* </p>
|
|
41259
41278
|
* @example
|
|
41260
41279
|
* // Do not execute any commands.
|
|
41261
|
-
|
|
41262
|
-
|
|
41263
|
-
|
|
41264
|
-
|
|
41265
|
-
|
|
41266
|
-
|
|
41267
|
-
|
|
41268
|
-
|
|
41269
|
-
|
|
41280
|
+
* scene.debugCommandFilter = function(command) {
|
|
41281
|
+
* return false;
|
|
41282
|
+
* };
|
|
41283
|
+
*
|
|
41284
|
+
* // Execute only the billboard's commands. That is, only draw the billboard.
|
|
41285
|
+
* const billboards = new Cesium.BillboardCollection();
|
|
41286
|
+
* scene.debugCommandFilter = function(command) {
|
|
41287
|
+
* return command.owner === billboards;
|
|
41288
|
+
* };
|
|
41270
41289
|
*/
|
|
41271
41290
|
debugCommandFilter: (...params: any[]) => any;
|
|
41272
41291
|
/**
|
|
41273
41292
|
* This property is for debugging only; it is not for production use.
|
|
41274
|
-
|
|
41275
|
-
|
|
41276
|
-
|
|
41277
|
-
|
|
41278
|
-
|
|
41293
|
+
* <p>
|
|
41294
|
+
* When <code>true</code>, commands are randomly shaded. This is useful
|
|
41295
|
+
* for performance analysis to see what parts of a scene or model are
|
|
41296
|
+
* command-dense and could benefit from batching.
|
|
41297
|
+
* </p>
|
|
41279
41298
|
*/
|
|
41280
41299
|
debugShowCommands: boolean;
|
|
41281
41300
|
/**
|
|
41282
41301
|
* This property is for debugging only; it is not for production use.
|
|
41283
|
-
|
|
41284
|
-
|
|
41285
|
-
|
|
41286
|
-
|
|
41287
|
-
|
|
41288
|
-
|
|
41289
|
-
|
|
41290
|
-
|
|
41302
|
+
* <p>
|
|
41303
|
+
* When <code>true</code>, commands are shaded based on the frustums they
|
|
41304
|
+
* overlap. Commands in the closest frustum are tinted red, commands in
|
|
41305
|
+
* the next closest are green, and commands in the farthest frustum are
|
|
41306
|
+
* blue. If a command overlaps more than one frustum, the color components
|
|
41307
|
+
* are combined, e.g., a command overlapping the first two frustums is tinted
|
|
41308
|
+
* yellow.
|
|
41309
|
+
* </p>
|
|
41291
41310
|
*/
|
|
41292
41311
|
debugShowFrustums: boolean;
|
|
41293
41312
|
/**
|
|
41294
41313
|
* This property is for debugging only; it is not for production use.
|
|
41295
|
-
|
|
41296
|
-
|
|
41297
|
-
|
|
41314
|
+
* <p>
|
|
41315
|
+
* Displays frames per second and time between frames.
|
|
41316
|
+
* </p>
|
|
41298
41317
|
*/
|
|
41299
41318
|
debugShowFramesPerSecond: boolean;
|
|
41300
41319
|
/**
|
|
41301
41320
|
* This property is for debugging only; it is not for production use.
|
|
41302
|
-
|
|
41303
|
-
|
|
41304
|
-
|
|
41321
|
+
* <p>
|
|
41322
|
+
* Indicates which frustum will have depth information displayed.
|
|
41323
|
+
* </p>
|
|
41305
41324
|
*/
|
|
41306
41325
|
debugShowDepthFrustum: number;
|
|
41307
41326
|
/**
|
|
41308
41327
|
* This property is for debugging only; it is not for production use.
|
|
41309
|
-
|
|
41310
|
-
|
|
41311
|
-
|
|
41328
|
+
* <p>
|
|
41329
|
+
* When <code>true</code>, draws outlines to show the boundaries of the camera frustums
|
|
41330
|
+
* </p>
|
|
41312
41331
|
*/
|
|
41313
41332
|
debugShowFrustumPlanes: boolean;
|
|
41314
41333
|
/**
|
|
@@ -41317,33 +41336,33 @@ export class Scene {
|
|
|
41317
41336
|
useDepthPicking: boolean;
|
|
41318
41337
|
/**
|
|
41319
41338
|
* 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.
|
|
41320
|
-
|
|
41321
|
-
|
|
41322
|
-
|
|
41323
|
-
|
|
41324
|
-
|
|
41339
|
+
*
|
|
41340
|
+
* <p>
|
|
41341
|
+
* There is a decrease in performance when enabled. There are extra draw calls to write depth for
|
|
41342
|
+
* translucent geometry.
|
|
41343
|
+
* </p>
|
|
41325
41344
|
* @example
|
|
41326
41345
|
* // picking the position of a translucent primitive
|
|
41327
|
-
|
|
41328
|
-
|
|
41329
|
-
|
|
41330
|
-
|
|
41331
|
-
|
|
41332
|
-
|
|
41333
|
-
|
|
41334
|
-
|
|
41346
|
+
* viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {
|
|
41347
|
+
* const pickedFeature = viewer.scene.pick(movement.position);
|
|
41348
|
+
* if (!Cesium.defined(pickedFeature)) {
|
|
41349
|
+
* // nothing picked
|
|
41350
|
+
* return;
|
|
41351
|
+
* }
|
|
41352
|
+
* const worldPosition = viewer.scene.pickPosition(movement.position);
|
|
41353
|
+
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
41335
41354
|
*/
|
|
41336
41355
|
pickTranslucentDepth: boolean;
|
|
41337
41356
|
/**
|
|
41338
41357
|
* Settings for atmosphere lighting effects affecting 3D Tiles and model rendering. This is not to be confused with
|
|
41339
|
-
|
|
41358
|
+
* {@link Scene#skyAtmosphere} which is responsible for rendering the sky.
|
|
41340
41359
|
*/
|
|
41341
41360
|
atmosphere: Atmosphere;
|
|
41342
41361
|
/**
|
|
41343
41362
|
* Blends the atmosphere to geometry far from the camera for horizon views. Allows for additional
|
|
41344
|
-
|
|
41345
|
-
|
|
41346
|
-
|
|
41363
|
+
* performance improvements by rendering less geometry and dispatching less terrain requests.
|
|
41364
|
+
*
|
|
41365
|
+
* Disbaled by default if an ellipsoid other than WGS84 is used.
|
|
41347
41366
|
*/
|
|
41348
41367
|
fog: Fog;
|
|
41349
41368
|
/**
|
|
@@ -41352,13 +41371,13 @@ export class Scene {
|
|
|
41352
41371
|
shadowMap: ShadowMap;
|
|
41353
41372
|
/**
|
|
41354
41373
|
* When <code>false</code>, 3D Tiles will render normally. When <code>true</code>, classified 3D Tile geometry will render normally and
|
|
41355
|
-
|
|
41374
|
+
* unclassified 3D Tile geometry will render with the color multiplied by {@link Scene#invertClassificationColor}.
|
|
41356
41375
|
*/
|
|
41357
41376
|
invertClassification: boolean;
|
|
41358
41377
|
/**
|
|
41359
41378
|
* The highlight color of unclassified 3D Tile geometry when {@link Scene#invertClassification} is <code>true</code>.
|
|
41360
|
-
|
|
41361
|
-
|
|
41379
|
+
* <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>
|
|
41380
|
+
* <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>
|
|
41362
41381
|
*/
|
|
41363
41382
|
invertClassificationColor: Color;
|
|
41364
41383
|
/**
|
|
@@ -41375,18 +41394,18 @@ export class Scene {
|
|
|
41375
41394
|
postProcessStages: PostProcessStageCollection;
|
|
41376
41395
|
/**
|
|
41377
41396
|
* When <code>true</code>, rendering a frame will only occur when needed as determined by changes within the scene.
|
|
41378
|
-
|
|
41379
|
-
|
|
41380
|
-
|
|
41397
|
+
* Enabling improves performance of the application, but requires using {@link Scene#requestRender}
|
|
41398
|
+
* to render a new frame explicitly in this mode. This will be necessary in many cases after making changes
|
|
41399
|
+
* to the scene in other parts of the API.
|
|
41381
41400
|
*/
|
|
41382
41401
|
requestRenderMode: boolean;
|
|
41383
41402
|
/**
|
|
41384
41403
|
* If {@link Scene#requestRenderMode} is <code>true</code>, this value defines the maximum change in
|
|
41385
|
-
|
|
41386
|
-
|
|
41387
|
-
|
|
41388
|
-
|
|
41389
|
-
|
|
41404
|
+
* simulation time allowed before a render is requested. Lower values increase the number of frames rendered
|
|
41405
|
+
* and higher values decrease the number of frames rendered. If <code>undefined</code>, changes to
|
|
41406
|
+
* the simulation time will never request a render.
|
|
41407
|
+
* This value impacts the rate of rendering for changes in the scene like lighting, entity property updates,
|
|
41408
|
+
* and animations.
|
|
41390
41409
|
*/
|
|
41391
41410
|
maximumRenderTimeChange: number;
|
|
41392
41411
|
/**
|
|
@@ -41403,7 +41422,7 @@ export class Scene {
|
|
|
41403
41422
|
light: Light;
|
|
41404
41423
|
/**
|
|
41405
41424
|
* Use this to set the default value for {@link Scene#logarithmicDepthBuffer} in newly constructed Scenes
|
|
41406
|
-
|
|
41425
|
+
* This property relies on fragmentDepth being supported.
|
|
41407
41426
|
*/
|
|
41408
41427
|
static defaultLogDepthBuffer: any;
|
|
41409
41428
|
/**
|
|
@@ -41488,48 +41507,48 @@ export class Scene {
|
|
|
41488
41507
|
readonly terrainProviderChanged: Event;
|
|
41489
41508
|
/**
|
|
41490
41509
|
* Gets the event that will be raised before the scene is updated or rendered. Subscribers to the event
|
|
41491
|
-
|
|
41510
|
+
* receive the Scene instance as the first parameter and the current time as the second parameter.
|
|
41492
41511
|
*/
|
|
41493
41512
|
readonly preUpdate: Event;
|
|
41494
41513
|
/**
|
|
41495
41514
|
* Gets the event that will be raised immediately after the scene is updated and before the scene is rendered.
|
|
41496
|
-
|
|
41497
|
-
|
|
41515
|
+
* Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
|
|
41516
|
+
* parameter.
|
|
41498
41517
|
*/
|
|
41499
41518
|
readonly postUpdate: Event;
|
|
41500
41519
|
/**
|
|
41501
41520
|
* Gets the event that will be raised when an error is thrown inside the <code>render</code> function.
|
|
41502
|
-
|
|
41503
|
-
|
|
41504
|
-
|
|
41521
|
+
* The Scene instance and the thrown error are the only two parameters passed to the event handler.
|
|
41522
|
+
* By default, errors are not rethrown after this event is raised, but that can be changed by setting
|
|
41523
|
+
* the <code>rethrowRenderErrors</code> property.
|
|
41505
41524
|
*/
|
|
41506
41525
|
readonly renderError: Event;
|
|
41507
41526
|
/**
|
|
41508
41527
|
* Gets the event that will be raised after the scene is updated and immediately before the scene is rendered.
|
|
41509
|
-
|
|
41510
|
-
|
|
41528
|
+
* Subscribers to the event receive the Scene instance as the first parameter and the current time as the second
|
|
41529
|
+
* parameter.
|
|
41511
41530
|
*/
|
|
41512
41531
|
readonly preRender: Event;
|
|
41513
41532
|
/**
|
|
41514
41533
|
* Gets the event that will be raised immediately after the scene is rendered. Subscribers to the event
|
|
41515
|
-
|
|
41534
|
+
* receive the Scene instance as the first parameter and the current time as the second parameter.
|
|
41516
41535
|
*/
|
|
41517
41536
|
readonly postRender: Event;
|
|
41518
41537
|
/**
|
|
41519
41538
|
* Gets the simulation time when the scene was last rendered. Returns undefined if the scene has not yet been
|
|
41520
|
-
|
|
41539
|
+
* rendered.
|
|
41521
41540
|
*/
|
|
41522
41541
|
readonly lastRenderTime: JulianDate;
|
|
41523
41542
|
/**
|
|
41524
41543
|
* This property is for debugging only; it is not for production use.
|
|
41525
|
-
|
|
41526
|
-
|
|
41527
|
-
|
|
41528
|
-
|
|
41529
|
-
|
|
41530
|
-
|
|
41531
|
-
|
|
41532
|
-
|
|
41544
|
+
* <p>
|
|
41545
|
+
* When {@link Scene.debugShowFrustums} is <code>true</code>, this contains
|
|
41546
|
+
* properties with statistics about the number of command execute per frustum.
|
|
41547
|
+
* <code>totalCommands</code> is the total number of commands executed, ignoring
|
|
41548
|
+
* overlap. <code>commandsInFrustums</code> is an array with the number of times
|
|
41549
|
+
* commands are executed redundantly, e.g., how many commands overlap two or
|
|
41550
|
+
* three frustums.
|
|
41551
|
+
* </p>
|
|
41533
41552
|
*/
|
|
41534
41553
|
readonly debugFrustumStatistics: any;
|
|
41535
41554
|
/**
|
|
@@ -41538,8 +41557,8 @@ export class Scene {
|
|
|
41538
41557
|
readonly scene3DOnly: boolean;
|
|
41539
41558
|
/**
|
|
41540
41559
|
* Gets whether or not the scene has order independent translucency enabled.
|
|
41541
|
-
|
|
41542
|
-
|
|
41560
|
+
* Note that this only reflects the original construction option, and there are
|
|
41561
|
+
* other factors that could prevent OIT from functioning on a given system configuration.
|
|
41543
41562
|
*/
|
|
41544
41563
|
readonly orderIndependentTranslucency: boolean;
|
|
41545
41564
|
/**
|
|
@@ -41552,7 +41571,7 @@ export class Scene {
|
|
|
41552
41571
|
mode: SceneMode;
|
|
41553
41572
|
/**
|
|
41554
41573
|
* When <code>true</code>, splits the scene into two viewports with steroscopic views for the left and right eyes.
|
|
41555
|
-
|
|
41574
|
+
* Used for cardboard and WebVR.
|
|
41556
41575
|
*/
|
|
41557
41576
|
useWebVR: boolean;
|
|
41558
41577
|
/**
|
|
@@ -41565,14 +41584,14 @@ export class Scene {
|
|
|
41565
41584
|
splitPosition: number;
|
|
41566
41585
|
/**
|
|
41567
41586
|
* The distance from the camera at which to disable the depth test of billboards, labels and points
|
|
41568
|
-
|
|
41569
|
-
|
|
41570
|
-
|
|
41587
|
+
* to, for example, prevent clipping against terrain. When set to zero, the depth test should always
|
|
41588
|
+
* be applied. When less than zero, the depth test should never be applied. Setting the disableDepthTestDistance
|
|
41589
|
+
* property of a billboard, label or point will override this value.
|
|
41571
41590
|
*/
|
|
41572
41591
|
minimumDisableDepthTestDistance: number;
|
|
41573
41592
|
/**
|
|
41574
41593
|
* Whether or not to use a logarithmic depth buffer. Enabling this option will allow for less frustums in the multi-frustum,
|
|
41575
|
-
|
|
41594
|
+
* increasing performance. This property relies on fragmentDepth being supported.
|
|
41576
41595
|
*/
|
|
41577
41596
|
logarithmicDepthBuffer: boolean;
|
|
41578
41597
|
/**
|
|
@@ -41607,30 +41626,30 @@ export class Scene {
|
|
|
41607
41626
|
getCompressedTextureFormatSupported(format: string): boolean;
|
|
41608
41627
|
/**
|
|
41609
41628
|
* Update and render the scene. It is usually not necessary to call this function
|
|
41610
|
-
|
|
41629
|
+
* directly because {@link CesiumWidget} will do it automatically.
|
|
41611
41630
|
* @param [time] - The simulation time at which to render.
|
|
41612
41631
|
*/
|
|
41613
41632
|
render(time?: JulianDate): void;
|
|
41614
41633
|
/**
|
|
41615
41634
|
* Requests a new rendered frame when {@link Scene#requestRenderMode} is set to <code>true</code>.
|
|
41616
|
-
|
|
41635
|
+
* The render rate will not exceed the {@link CesiumWidget#targetFrameRate}.
|
|
41617
41636
|
*/
|
|
41618
41637
|
requestRender(): void;
|
|
41619
41638
|
/**
|
|
41620
41639
|
* Returns an object with a `primitive` property that contains the first (top) primitive in the scene
|
|
41621
|
-
|
|
41622
|
-
|
|
41623
|
-
|
|
41624
|
-
|
|
41625
|
-
|
|
41640
|
+
* at a particular window coordinate or undefined if nothing is at the location. Other properties may
|
|
41641
|
+
* potentially be set depending on the type of primitive and may be used to further identify the picked object.
|
|
41642
|
+
* <p>
|
|
41643
|
+
* When a feature of a 3D Tiles tileset is picked, <code>pick</code> returns a {@link Cesium3DTileFeature} object.
|
|
41644
|
+
* </p>
|
|
41626
41645
|
* @example
|
|
41627
41646
|
* // On mouse over, color the feature yellow.
|
|
41628
|
-
|
|
41629
|
-
|
|
41630
|
-
|
|
41631
|
-
|
|
41632
|
-
|
|
41633
|
-
|
|
41647
|
+
* handler.setInputAction(function(movement) {
|
|
41648
|
+
* const feature = scene.pick(movement.endPosition);
|
|
41649
|
+
* if (feature instanceof Cesium.Cesium3DTileFeature) {
|
|
41650
|
+
* feature.color = Cesium.Color.YELLOW;
|
|
41651
|
+
* }
|
|
41652
|
+
* }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41634
41653
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41635
41654
|
* @param [width = 3] - Width of the pick rectangle.
|
|
41636
41655
|
* @param [height = 3] - Height of the pick rectangle.
|
|
@@ -41639,15 +41658,15 @@ export class Scene {
|
|
|
41639
41658
|
pick(windowPosition: Cartesian2, width?: number, height?: number): any;
|
|
41640
41659
|
/**
|
|
41641
41660
|
* Returns a {@link VoxelCell} for the voxel sample rendered at a particular window coordinate,
|
|
41642
|
-
|
|
41661
|
+
* or undefined if no voxel is rendered at that position.
|
|
41643
41662
|
* @example
|
|
41644
41663
|
* On left click, report the value of the "color" property at that voxel sample.
|
|
41645
|
-
|
|
41646
|
-
|
|
41647
|
-
|
|
41648
|
-
|
|
41649
|
-
|
|
41650
|
-
|
|
41664
|
+
* handler.setInputAction(function(movement) {
|
|
41665
|
+
* const voxelCell = scene.pickVoxel(movement.position);
|
|
41666
|
+
* if (defined(voxelCell)) {
|
|
41667
|
+
* console.log(voxelCell.getProperty("color"));
|
|
41668
|
+
* }
|
|
41669
|
+
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
41651
41670
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41652
41671
|
* @param [width = 3] - Width of the pick rectangle.
|
|
41653
41672
|
* @param [height = 3] - Height of the pick rectangle.
|
|
@@ -41658,34 +41677,34 @@ export class Scene {
|
|
|
41658
41677
|
* Pick a metadata value at the given window position.
|
|
41659
41678
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41660
41679
|
* @param schemaId - The ID of the metadata schema to pick values
|
|
41661
|
-
|
|
41662
|
-
|
|
41680
|
+
* from. If this is `undefined`, then it will pick the values from the object
|
|
41681
|
+
* that match the given class- and property name, regardless of the schema ID.
|
|
41663
41682
|
* @param className - The name of the metadata class to pick
|
|
41664
|
-
|
|
41683
|
+
* values from
|
|
41665
41684
|
* @param propertyName - The name of the metadata property to pick
|
|
41666
|
-
|
|
41685
|
+
* values from
|
|
41667
41686
|
* @returns The metadata value, or `undefined` when
|
|
41668
|
-
|
|
41687
|
+
* no matching metadata was found at the given position
|
|
41669
41688
|
*/
|
|
41670
41689
|
pickMetadata(windowPosition: Cartesian2, schemaId: string | undefined, className: string, propertyName: string): MetadataValue | undefined;
|
|
41671
41690
|
/**
|
|
41672
41691
|
* Pick the schema of the metadata of the object at the given position
|
|
41673
41692
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41674
41693
|
* @returns The metadata schema, or `undefined` if there is no object with
|
|
41675
|
-
|
|
41694
|
+
* associated metadata at the given position.
|
|
41676
41695
|
*/
|
|
41677
41696
|
pickMetadataSchema(windowPosition: Cartesian2): MetadataSchema;
|
|
41678
41697
|
/**
|
|
41679
41698
|
* Returns the cartesian position reconstructed from the depth buffer and window position.
|
|
41680
|
-
|
|
41681
|
-
|
|
41682
|
-
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41686
|
-
|
|
41687
|
-
|
|
41688
|
-
|
|
41699
|
+
* <p>
|
|
41700
|
+
* The position reconstructed from the depth buffer in 2D may be slightly different from those
|
|
41701
|
+
* reconstructed in 3D and Columbus view. This is caused by the difference in the distribution
|
|
41702
|
+
* of depth values of perspective and orthographic projection.
|
|
41703
|
+
* </p>
|
|
41704
|
+
* <p>
|
|
41705
|
+
* Set {@link Scene#pickTranslucentDepth} to <code>true</code> to include the depth of
|
|
41706
|
+
* translucent primitives; otherwise, this essentially picks through translucent primitives.
|
|
41707
|
+
* </p>
|
|
41689
41708
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
41690
41709
|
* @param [result] - The object on which to restore the result.
|
|
41691
41710
|
* @returns The cartesian position.
|
|
@@ -41693,9 +41712,9 @@ export class Scene {
|
|
|
41693
41712
|
pickPosition(windowPosition: Cartesian2, result?: Cartesian3): Cartesian3;
|
|
41694
41713
|
/**
|
|
41695
41714
|
* Returns a list of objects, each containing a `primitive` property, for all primitives at
|
|
41696
|
-
|
|
41697
|
-
|
|
41698
|
-
|
|
41715
|
+
* a particular window coordinate position. Other properties may also be set depending on the
|
|
41716
|
+
* type of primitive and may be used to further identify the picked object. The primitives in
|
|
41717
|
+
* the list are ordered by their visual order in the scene (front to back).
|
|
41699
41718
|
* @example
|
|
41700
41719
|
* const pickedObjects = scene.drillPick(new Cesium.Cartesian2(100.0, 200.0));
|
|
41701
41720
|
* @param windowPosition - Window coordinates to perform picking on.
|
|
@@ -41707,16 +41726,16 @@ export class Scene {
|
|
|
41707
41726
|
drillPick(windowPosition: Cartesian2, limit?: number, width?: number, height?: number): any[];
|
|
41708
41727
|
/**
|
|
41709
41728
|
* Returns the height of scene geometry at the given cartographic position or <code>undefined</code> if there was no
|
|
41710
|
-
|
|
41711
|
-
|
|
41712
|
-
|
|
41713
|
-
|
|
41714
|
-
|
|
41715
|
-
|
|
41729
|
+
* scene geometry to sample height from. The height of the input position is ignored. May be used to clamp objects to
|
|
41730
|
+
* the globe, 3D Tiles, or primitives in the scene.
|
|
41731
|
+
* <p>
|
|
41732
|
+
* This function only samples height from globe tiles and 3D Tiles that are rendered in the current view. Samples height
|
|
41733
|
+
* from all other primitives regardless of their visibility.
|
|
41734
|
+
* </p>
|
|
41716
41735
|
* @example
|
|
41717
41736
|
* const position = new Cesium.Cartographic(-1.31968, 0.698874);
|
|
41718
|
-
|
|
41719
|
-
|
|
41737
|
+
* const height = viewer.scene.sampleHeight(position);
|
|
41738
|
+
* console.log(height);
|
|
41720
41739
|
* @param position - The cartographic position to sample height from.
|
|
41721
41740
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
41722
41741
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41725,16 +41744,16 @@ export class Scene {
|
|
|
41725
41744
|
sampleHeight(position: Cartographic, objectsToExclude?: object[], width?: number): number;
|
|
41726
41745
|
/**
|
|
41727
41746
|
* Clamps the given cartesian position to the scene geometry along the geodetic surface normal. Returns the
|
|
41728
|
-
|
|
41729
|
-
|
|
41730
|
-
|
|
41731
|
-
|
|
41732
|
-
|
|
41733
|
-
|
|
41747
|
+
* clamped position or <code>undefined</code> if there was no scene geometry to clamp to. May be used to clamp
|
|
41748
|
+
* objects to the globe, 3D Tiles, or primitives in the scene.
|
|
41749
|
+
* <p>
|
|
41750
|
+
* This function only clamps to globe tiles and 3D Tiles that are rendered in the current view. Clamps to
|
|
41751
|
+
* all other primitives regardless of their visibility.
|
|
41752
|
+
* </p>
|
|
41734
41753
|
* @example
|
|
41735
41754
|
* // Clamp an entity to the underlying scene geometry
|
|
41736
|
-
|
|
41737
|
-
|
|
41755
|
+
* const position = entity.position.getValue(Cesium.JulianDate.now());
|
|
41756
|
+
* entity.position = viewer.scene.clampToHeight(position);
|
|
41738
41757
|
* @param cartesian - The cartesian position.
|
|
41739
41758
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
41740
41759
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41744,20 +41763,20 @@ export class Scene {
|
|
|
41744
41763
|
clampToHeight(cartesian: Cartesian3, objectsToExclude?: object[], width?: number, result?: Cartesian3): Cartesian3;
|
|
41745
41764
|
/**
|
|
41746
41765
|
* Initiates an asynchronous {@link Scene#sampleHeight} query for an array of {@link Cartographic} positions
|
|
41747
|
-
|
|
41748
|
-
|
|
41749
|
-
|
|
41750
|
-
|
|
41766
|
+
* using the maximum level of detail for 3D Tilesets in the scene. The height of the input positions is ignored.
|
|
41767
|
+
* Returns a promise that is resolved when the query completes. Each point height is modified in place.
|
|
41768
|
+
* If a height cannot be determined because no geometry can be sampled at that location, or another error occurs,
|
|
41769
|
+
* the height is set to undefined.
|
|
41751
41770
|
* @example
|
|
41752
41771
|
* const positions = [
|
|
41753
|
-
|
|
41754
|
-
|
|
41755
|
-
|
|
41756
|
-
|
|
41757
|
-
|
|
41758
|
-
|
|
41759
|
-
|
|
41760
|
-
|
|
41772
|
+
* new Cesium.Cartographic(-1.31968, 0.69887),
|
|
41773
|
+
* new Cesium.Cartographic(-1.10489, 0.83923)
|
|
41774
|
+
* ];
|
|
41775
|
+
* const promise = viewer.scene.sampleHeightMostDetailed(positions);
|
|
41776
|
+
* promise.then(function(updatedPosition) {
|
|
41777
|
+
* // positions[0].height and positions[1].height have been updated.
|
|
41778
|
+
* // updatedPositions is just a reference to positions.
|
|
41779
|
+
* }
|
|
41761
41780
|
* @param positions - The cartographic positions to update with sampled heights.
|
|
41762
41781
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not sample height from.
|
|
41763
41782
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41766,19 +41785,19 @@ export class Scene {
|
|
|
41766
41785
|
sampleHeightMostDetailed(positions: Cartographic[], objectsToExclude?: object[], width?: number): Promise<Cartographic[]>;
|
|
41767
41786
|
/**
|
|
41768
41787
|
* Initiates an asynchronous {@link Scene#clampToHeight} query for an array of {@link Cartesian3} positions
|
|
41769
|
-
|
|
41770
|
-
|
|
41771
|
-
|
|
41788
|
+
* using the maximum level of detail for 3D Tilesets in the scene. Returns a promise that is resolved when
|
|
41789
|
+
* the query completes. Each position is modified in place. If a position cannot be clamped because no geometry
|
|
41790
|
+
* can be sampled at that location, or another error occurs, the element in the array is set to undefined.
|
|
41772
41791
|
* @example
|
|
41773
41792
|
* const cartesians = [
|
|
41774
|
-
|
|
41775
|
-
|
|
41776
|
-
|
|
41777
|
-
|
|
41778
|
-
|
|
41779
|
-
|
|
41780
|
-
|
|
41781
|
-
|
|
41793
|
+
* entities[0].position.getValue(Cesium.JulianDate.now()),
|
|
41794
|
+
* entities[1].position.getValue(Cesium.JulianDate.now())
|
|
41795
|
+
* ];
|
|
41796
|
+
* const promise = viewer.scene.clampToHeightMostDetailed(cartesians);
|
|
41797
|
+
* promise.then(function(updatedCartesians) {
|
|
41798
|
+
* entities[0].position = updatedCartesians[0];
|
|
41799
|
+
* entities[1].position = updatedCartesians[1];
|
|
41800
|
+
* }
|
|
41782
41801
|
* @param cartesians - The cartesian positions to update with clamped positions.
|
|
41783
41802
|
* @param [objectsToExclude] - A list of primitives, entities, or 3D Tiles features to not clamp to.
|
|
41784
41803
|
* @param [width = 0.1] - Width of the intersection volume in meters.
|
|
@@ -41787,15 +41806,15 @@ export class Scene {
|
|
|
41787
41806
|
clampToHeightMostDetailed(cartesians: Cartesian3[], objectsToExclude?: object[], width?: number): Promise<Cartesian3[]>;
|
|
41788
41807
|
/**
|
|
41789
41808
|
* Transforms a position in cartesian coordinates to canvas coordinates. This is commonly used to place an
|
|
41790
|
-
|
|
41809
|
+
* HTML element at the same screen position as an object in the scene.
|
|
41791
41810
|
* @example
|
|
41792
41811
|
* // Output the canvas position of longitude/latitude (0, 0) every time the mouse moves.
|
|
41793
|
-
|
|
41794
|
-
|
|
41795
|
-
|
|
41796
|
-
|
|
41797
|
-
|
|
41798
|
-
|
|
41812
|
+
* const scene = widget.scene;
|
|
41813
|
+
* const position = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
41814
|
+
* const handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
|
41815
|
+
* handler.setInputAction(function(movement) {
|
|
41816
|
+
* console.log(scene.cartesianToCanvasCoordinates(position));
|
|
41817
|
+
* }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41799
41818
|
* @param position - The position in cartesian coordinates.
|
|
41800
41819
|
* @param [result] - An optional object to return the input position transformed to canvas coordinates.
|
|
41801
41820
|
* @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.
|
|
@@ -41824,34 +41843,34 @@ export class Scene {
|
|
|
41824
41843
|
* Update the terrain providing surface geometry for the globe.
|
|
41825
41844
|
* @example
|
|
41826
41845
|
* // Use Cesium World Terrain
|
|
41827
|
-
|
|
41846
|
+
* scene.setTerrain(Cesium.Terrain.fromWorldTerrain());
|
|
41828
41847
|
* @example
|
|
41829
41848
|
* // Use a custom terrain provider
|
|
41830
|
-
|
|
41831
|
-
|
|
41832
|
-
|
|
41833
|
-
|
|
41834
|
-
|
|
41835
|
-
|
|
41849
|
+
* const terrain = new Cesium.Terrain(Cesium.CesiumTerrainProvider.fromUrl("https://myTestTerrain.com"));
|
|
41850
|
+
* scene.setTerrain(terrain);
|
|
41851
|
+
*
|
|
41852
|
+
* terrain.errorEvent.addEventListener(error => {
|
|
41853
|
+
* alert(`Encountered an error while creating terrain! ${error}`);
|
|
41854
|
+
* });
|
|
41836
41855
|
* @param terrain - The terrain provider async helper
|
|
41837
41856
|
* @returns terrain The terrain provider async helper
|
|
41838
41857
|
*/
|
|
41839
41858
|
setTerrain(terrain: Terrain): Terrain;
|
|
41840
41859
|
/**
|
|
41841
41860
|
* Returns true if this object was destroyed; otherwise, false.
|
|
41842
|
-
|
|
41843
|
-
|
|
41844
|
-
|
|
41861
|
+
* <br /><br />
|
|
41862
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
41863
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
41845
41864
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
41846
41865
|
*/
|
|
41847
41866
|
isDestroyed(): boolean;
|
|
41848
41867
|
/**
|
|
41849
41868
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
41850
|
-
|
|
41851
|
-
|
|
41852
|
-
|
|
41853
|
-
|
|
41854
|
-
|
|
41869
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
41870
|
+
* <br /><br />
|
|
41871
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
41872
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
41873
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
41855
41874
|
* @example
|
|
41856
41875
|
* scene = scene && scene.destroy();
|
|
41857
41876
|
*/
|
|
@@ -41860,11 +41879,11 @@ export class Scene {
|
|
|
41860
41879
|
|
|
41861
41880
|
/**
|
|
41862
41881
|
* Determine how translucent surfaces will be handled.
|
|
41863
|
-
|
|
41864
|
-
When OIT is enabled, then this will delegate to OIT.executeCommands.
|
|
41865
|
-
Otherwise, it will just be executeTranslucentCommandsBackToFront
|
|
41866
|
-
for render passes, or executeTranslucentCommandsFrontToBack for
|
|
41867
|
-
other passes.
|
|
41882
|
+
*
|
|
41883
|
+
* When OIT is enabled, then this will delegate to OIT.executeCommands.
|
|
41884
|
+
* Otherwise, it will just be executeTranslucentCommandsBackToFront
|
|
41885
|
+
* for render passes, or executeTranslucentCommandsFrontToBack for
|
|
41886
|
+
* other passes.
|
|
41868
41887
|
* @param scene - The scene.
|
|
41869
41888
|
* @returns A function to execute translucent commands.
|
|
41870
41889
|
*/
|
|
@@ -41899,14 +41918,14 @@ export enum SceneMode {
|
|
|
41899
41918
|
export namespace SceneTransforms {
|
|
41900
41919
|
/**
|
|
41901
41920
|
* Transforms a position in world (WGS84 or alternative ellipsoid) coordinates to window coordinates. This is commonly used to place an
|
|
41902
|
-
|
|
41921
|
+
HTML element at the same screen position as an object in the scene.
|
|
41903
41922
|
* @example
|
|
41904
41923
|
* // Output the window position of longitude/latitude (0, 0) every time the mouse moves.
|
|
41905
|
-
|
|
41906
|
-
|
|
41907
|
-
|
|
41908
|
-
|
|
41909
|
-
|
|
41924
|
+
const position = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
41925
|
+
const handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
|
41926
|
+
handler.setInputAction(function(movement) {
|
|
41927
|
+
console.log(Cesium.SceneTransforms.worldToWindowCoordinates(scene, position));
|
|
41928
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41910
41929
|
* @param scene - The scene.
|
|
41911
41930
|
* @param position - The position in world (WGS84 or alternative ellipsoid) coordinates.
|
|
41912
41931
|
* @param [result] - An optional object to return the input position transformed to window coordinates.
|
|
@@ -41915,14 +41934,14 @@ export namespace SceneTransforms {
|
|
|
41915
41934
|
function worldToWindowCoordinates(scene: Scene, position: Cartesian3, result?: Cartesian2): Cartesian2 | undefined;
|
|
41916
41935
|
/**
|
|
41917
41936
|
* Transforms a position in world coordinates to drawing buffer coordinates. This may produce different
|
|
41918
|
-
|
|
41937
|
+
results from SceneTransforms.worldToWindowCoordinates when the browser zoom is not 100%, or on high-DPI displays.
|
|
41919
41938
|
* @example
|
|
41920
41939
|
* // Output the window position of longitude/latitude (0, 0) every time the mouse moves.
|
|
41921
|
-
|
|
41922
|
-
|
|
41923
|
-
|
|
41924
|
-
|
|
41925
|
-
|
|
41940
|
+
const position = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
41941
|
+
const handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
|
|
41942
|
+
handler.setInputAction(function(movement) {
|
|
41943
|
+
console.log(Cesium.SceneTransforms.worldToDrawingBufferCoordinates(scene, position));
|
|
41944
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
41926
41945
|
* @param scene - The scene.
|
|
41927
41946
|
* @param position - The position in world (WGS84 or alternative ellipsoid) coordinates.
|
|
41928
41947
|
* @param [result] - An optional object to return the input position transformed to window coordinates.
|
|
@@ -41939,18 +41958,18 @@ export class ScreenSpaceCameraController {
|
|
|
41939
41958
|
constructor(scene: Scene);
|
|
41940
41959
|
/**
|
|
41941
41960
|
* If true, inputs are allowed conditionally with the flags enableTranslate, enableZoom,
|
|
41942
|
-
|
|
41943
|
-
|
|
41944
|
-
|
|
41945
|
-
|
|
41946
|
-
|
|
41947
|
-
|
|
41948
|
-
|
|
41961
|
+
* enableRotate, enableTilt, and enableLook. If false, all inputs are disabled.
|
|
41962
|
+
*
|
|
41963
|
+
* NOTE: This setting is for temporary use cases, such as camera flights and
|
|
41964
|
+
* drag-selection of regions (see Picking demo). It is typically set to false at the
|
|
41965
|
+
* start of such events, and set true on completion. To keep inputs disabled
|
|
41966
|
+
* past the end of camera flights, you must use the other booleans (enableTranslate,
|
|
41967
|
+
* enableZoom, enableRotate, enableTilt, and enableLook).
|
|
41949
41968
|
*/
|
|
41950
41969
|
enableInputs: boolean;
|
|
41951
41970
|
/**
|
|
41952
41971
|
* If true, allows the user to pan around the map. If false, the camera stays locked at the current position.
|
|
41953
|
-
|
|
41972
|
+
* This flag only applies in 2D and Columbus view modes.
|
|
41954
41973
|
*/
|
|
41955
41974
|
enableTranslate: boolean;
|
|
41956
41975
|
/**
|
|
@@ -41959,41 +41978,41 @@ export class ScreenSpaceCameraController {
|
|
|
41959
41978
|
enableZoom: boolean;
|
|
41960
41979
|
/**
|
|
41961
41980
|
* If true, allows the user to rotate the world which translates the user's position.
|
|
41962
|
-
|
|
41981
|
+
* This flag only applies in 2D and 3D.
|
|
41963
41982
|
*/
|
|
41964
41983
|
enableRotate: boolean;
|
|
41965
41984
|
/**
|
|
41966
41985
|
* If true, allows the user to tilt the camera. If false, the camera is locked to the current heading.
|
|
41967
|
-
|
|
41986
|
+
* This flag only applies in 3D and Columbus view.
|
|
41968
41987
|
*/
|
|
41969
41988
|
enableTilt: boolean;
|
|
41970
41989
|
/**
|
|
41971
41990
|
* If true, allows the user to use free-look. If false, the camera view direction can only be changed through translating
|
|
41972
|
-
|
|
41991
|
+
* or rotating. This flag only applies in 3D and Columbus view modes.
|
|
41973
41992
|
*/
|
|
41974
41993
|
enableLook: boolean;
|
|
41975
41994
|
/**
|
|
41976
41995
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
41977
|
-
|
|
41978
|
-
|
|
41996
|
+
* the camera will continue to spin because of inertia.
|
|
41997
|
+
* With value of zero, the camera will have no inertia.
|
|
41979
41998
|
*/
|
|
41980
41999
|
inertiaSpin: number;
|
|
41981
42000
|
/**
|
|
41982
42001
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
41983
|
-
|
|
41984
|
-
|
|
42002
|
+
* the camera will continue to translate because of inertia.
|
|
42003
|
+
* With value of zero, the camera will have no inertia.
|
|
41985
42004
|
*/
|
|
41986
42005
|
inertiaTranslate: number;
|
|
41987
42006
|
/**
|
|
41988
42007
|
* A parameter in the range <code>[0, 1)</code> used to determine how long
|
|
41989
|
-
|
|
41990
|
-
|
|
42008
|
+
* the camera will continue to zoom because of inertia.
|
|
42009
|
+
* With value of zero, the camera will have no inertia.
|
|
41991
42010
|
*/
|
|
41992
42011
|
inertiaZoom: number;
|
|
41993
42012
|
/**
|
|
41994
42013
|
* A parameter in the range <code>[0, 1)</code> used to limit the range
|
|
41995
|
-
|
|
41996
|
-
|
|
42014
|
+
* of various user inputs to a percentage of the window width/height per animation frame.
|
|
42015
|
+
* This helps keep the camera under control in low-frame-rate situations.
|
|
41997
42016
|
*/
|
|
41998
42017
|
maximumMovementRatio: number;
|
|
41999
42018
|
/**
|
|
@@ -42014,47 +42033,47 @@ export class ScreenSpaceCameraController {
|
|
|
42014
42033
|
zoomFactor: number;
|
|
42015
42034
|
/**
|
|
42016
42035
|
* The input that allows the user to pan around the map. This only applies in 2D and Columbus view modes.
|
|
42017
|
-
|
|
42018
|
-
|
|
42019
|
-
|
|
42020
|
-
|
|
42021
|
-
|
|
42036
|
+
* <p>
|
|
42037
|
+
* The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42038
|
+
* and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42039
|
+
* or an array of any of the preceding.
|
|
42040
|
+
* </p>
|
|
42022
42041
|
*/
|
|
42023
42042
|
translateEventTypes: CameraEventType | any[] | undefined;
|
|
42024
42043
|
/**
|
|
42025
42044
|
* The input that allows the user to zoom in/out.
|
|
42026
|
-
|
|
42027
|
-
|
|
42028
|
-
|
|
42029
|
-
|
|
42030
|
-
|
|
42045
|
+
* <p>
|
|
42046
|
+
* The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42047
|
+
* and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42048
|
+
* or an array of any of the preceding.
|
|
42049
|
+
* </p>
|
|
42031
42050
|
*/
|
|
42032
42051
|
zoomEventTypes: CameraEventType | any[] | undefined;
|
|
42033
42052
|
/**
|
|
42034
42053
|
* The input that allows the user to rotate around the globe or another object. This only applies in 3D and Columbus view modes.
|
|
42035
|
-
|
|
42036
|
-
|
|
42037
|
-
|
|
42038
|
-
|
|
42039
|
-
|
|
42054
|
+
* <p>
|
|
42055
|
+
* The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42056
|
+
* and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42057
|
+
* or an array of any of the preceding.
|
|
42058
|
+
* </p>
|
|
42040
42059
|
*/
|
|
42041
42060
|
rotateEventTypes: CameraEventType | any[] | undefined;
|
|
42042
42061
|
/**
|
|
42043
42062
|
* The input that allows the user to tilt in 3D and Columbus view or twist in 2D.
|
|
42044
|
-
|
|
42045
|
-
|
|
42046
|
-
|
|
42047
|
-
|
|
42048
|
-
|
|
42063
|
+
* <p>
|
|
42064
|
+
* The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42065
|
+
* and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42066
|
+
* or an array of any of the preceding.
|
|
42067
|
+
* </p>
|
|
42049
42068
|
*/
|
|
42050
42069
|
tiltEventTypes: CameraEventType | any[] | undefined;
|
|
42051
42070
|
/**
|
|
42052
42071
|
* The input that allows the user to change the direction the camera is viewing. This only applies in 3D and Columbus view modes.
|
|
42053
|
-
|
|
42054
|
-
|
|
42055
|
-
|
|
42056
|
-
|
|
42057
|
-
|
|
42072
|
+
* <p>
|
|
42073
|
+
* The type can be a {@link CameraEventType}, <code>undefined</code>, an object with <code>eventType</code>
|
|
42074
|
+
* and <code>modifier</code> properties with types <code>CameraEventType</code> and {@link KeyboardEventModifier},
|
|
42075
|
+
* or an array of any of the preceding.
|
|
42076
|
+
* </p>
|
|
42058
42077
|
*/
|
|
42059
42078
|
lookEventTypes: CameraEventType | any[] | undefined;
|
|
42060
42079
|
/**
|
|
@@ -42071,7 +42090,7 @@ export class ScreenSpaceCameraController {
|
|
|
42071
42090
|
minimumCollisionTerrainHeight: number;
|
|
42072
42091
|
/**
|
|
42073
42092
|
* The minimum height the camera must be before switching from rotating a track ball to
|
|
42074
|
-
|
|
42093
|
+
* free look when clicks originate on the sky or in space. Defaults to ellipsoid.minimumRadius * 1.175 when another ellipsoid than WGS84 is used.
|
|
42075
42094
|
*/
|
|
42076
42095
|
minimumTrackBallHeight: number;
|
|
42077
42096
|
/**
|
|
@@ -42082,23 +42101,23 @@ export class ScreenSpaceCameraController {
|
|
|
42082
42101
|
* 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.
|
|
42083
42102
|
* @example
|
|
42084
42103
|
* // Prevent the camera from tilting below the ellipsoid surface
|
|
42085
|
-
|
|
42104
|
+
* viewer.scene.screenSpaceCameraController.maximumTiltAngle = Math.PI / 2.0;
|
|
42086
42105
|
*/
|
|
42087
42106
|
maximumTiltAngle: number | undefined;
|
|
42088
42107
|
/**
|
|
42089
42108
|
* Returns true if this object was destroyed; otherwise, false.
|
|
42090
|
-
|
|
42091
|
-
|
|
42092
|
-
|
|
42109
|
+
* <br /><br />
|
|
42110
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
42111
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
42093
42112
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
42094
42113
|
*/
|
|
42095
42114
|
isDestroyed(): boolean;
|
|
42096
42115
|
/**
|
|
42097
42116
|
* Removes mouse listeners held by this object.
|
|
42098
|
-
|
|
42099
|
-
|
|
42100
|
-
|
|
42101
|
-
|
|
42117
|
+
* <br /><br />
|
|
42118
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
42119
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
42120
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
42102
42121
|
* @example
|
|
42103
42122
|
* controller = controller && controller.destroy();
|
|
42104
42123
|
*/
|
|
@@ -42125,13 +42144,13 @@ export enum SensorVolumePortionToDisplay {
|
|
|
42125
42144
|
|
|
42126
42145
|
/**
|
|
42127
42146
|
* <div class="notice">
|
|
42128
|
-
Use {@link Viewer#shadowMap} to get the scene's shadow map. Do not construct this directly.
|
|
42129
|
-
</div>
|
|
42130
|
-
|
|
42131
|
-
<p>
|
|
42132
|
-
The normalOffset bias pushes the shadows forward slightly, and may be disabled
|
|
42133
|
-
for applications that require ultra precise shadows.
|
|
42134
|
-
</p>
|
|
42147
|
+
* Use {@link Viewer#shadowMap} to get the scene's shadow map. Do not construct this directly.
|
|
42148
|
+
* </div>
|
|
42149
|
+
*
|
|
42150
|
+
* <p>
|
|
42151
|
+
* The normalOffset bias pushes the shadows forward slightly, and may be disabled
|
|
42152
|
+
* for applications that require ultra precise shadows.
|
|
42153
|
+
* </p>
|
|
42135
42154
|
*/
|
|
42136
42155
|
export class ShadowMap {
|
|
42137
42156
|
constructor();
|
|
@@ -43746,87 +43765,87 @@ export class VoxelPrimitive {
|
|
|
43746
43765
|
readonly availableLevels: number | undefined;
|
|
43747
43766
|
/**
|
|
43748
43767
|
* The event fired to indicate that a tile's content was loaded.
|
|
43749
|
-
|
|
43750
|
-
|
|
43751
|
-
|
|
43752
|
-
|
|
43753
|
-
|
|
43768
|
+
<p>
|
|
43769
|
+
This event is fired during the tileset traversal while the frame is being rendered
|
|
43770
|
+
so that updates to the tile take effect in the same frame. Do not create or modify
|
|
43771
|
+
Cesium entities or primitives during the event listener.
|
|
43772
|
+
</p>
|
|
43754
43773
|
* @example
|
|
43755
43774
|
* voxelPrimitive.tileLoad.addEventListener(function() {
|
|
43756
|
-
|
|
43757
|
-
|
|
43775
|
+
console.log('A tile was loaded.');
|
|
43776
|
+
});
|
|
43758
43777
|
*/
|
|
43759
43778
|
tileLoad: Event;
|
|
43760
43779
|
/**
|
|
43761
43780
|
* This event fires once for each visible tile in a frame.
|
|
43762
|
-
|
|
43763
|
-
|
|
43781
|
+
<p>
|
|
43782
|
+
This event is fired during the traversal while the frame is being rendered.
|
|
43764
43783
|
* @example
|
|
43765
43784
|
* voxelPrimitive.tileVisible.addEventListener(function() {
|
|
43766
|
-
|
|
43767
|
-
|
|
43785
|
+
console.log('A tile is visible.');
|
|
43786
|
+
});
|
|
43768
43787
|
*/
|
|
43769
43788
|
tileVisible: Event;
|
|
43770
43789
|
/**
|
|
43771
43790
|
* The event fired to indicate that a tile's content failed to load.
|
|
43772
43791
|
* @example
|
|
43773
43792
|
* voxelPrimitive.tileFailed.addEventListener(function() {
|
|
43774
|
-
|
|
43775
|
-
|
|
43793
|
+
console.log('An error occurred loading tile.');
|
|
43794
|
+
});
|
|
43776
43795
|
*/
|
|
43777
43796
|
tileFailed: Event;
|
|
43778
43797
|
/**
|
|
43779
43798
|
* The event fired to indicate that a tile's content was unloaded.
|
|
43780
43799
|
* @example
|
|
43781
43800
|
* voxelPrimitive.tileUnload.addEventListener(function() {
|
|
43782
|
-
|
|
43783
|
-
|
|
43801
|
+
console.log('A tile was unloaded from the cache.');
|
|
43802
|
+
});
|
|
43784
43803
|
*/
|
|
43785
43804
|
tileUnload: Event;
|
|
43786
43805
|
/**
|
|
43787
43806
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
43788
|
-
|
|
43789
|
-
|
|
43790
|
-
|
|
43791
|
-
|
|
43792
|
-
|
|
43793
|
-
|
|
43794
|
-
|
|
43795
|
-
|
|
43796
|
-
|
|
43807
|
+
is requested, when a requested tile is finished downloading, and when a downloaded tile has been
|
|
43808
|
+
processed and is ready to render.
|
|
43809
|
+
<p>
|
|
43810
|
+
The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
|
|
43811
|
+
processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
|
|
43812
|
+
</p>
|
|
43813
|
+
<p>
|
|
43814
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
43815
|
+
</p>
|
|
43797
43816
|
* @example
|
|
43798
43817
|
* voxelPrimitive.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
43799
|
-
|
|
43800
|
-
|
|
43801
|
-
|
|
43802
|
-
|
|
43803
|
-
|
|
43804
|
-
|
|
43805
|
-
|
|
43818
|
+
if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
43819
|
+
console.log('Finished loading');
|
|
43820
|
+
return;
|
|
43821
|
+
}
|
|
43822
|
+
|
|
43823
|
+
console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
|
|
43824
|
+
});
|
|
43806
43825
|
*/
|
|
43807
43826
|
loadProgress: Event;
|
|
43808
43827
|
/**
|
|
43809
43828
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The voxel
|
|
43810
|
-
|
|
43811
|
-
|
|
43812
|
-
|
|
43813
|
-
|
|
43829
|
+
primitive is completely loaded for this view.
|
|
43830
|
+
<p>
|
|
43831
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
43832
|
+
</p>
|
|
43814
43833
|
* @example
|
|
43815
43834
|
* voxelPrimitive.allTilesLoaded.addEventListener(function() {
|
|
43816
|
-
|
|
43817
|
-
|
|
43835
|
+
console.log('All tiles are loaded');
|
|
43836
|
+
});
|
|
43818
43837
|
*/
|
|
43819
43838
|
allTilesLoaded: Event;
|
|
43820
43839
|
/**
|
|
43821
43840
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
43825
|
-
|
|
43841
|
+
is fired once when all tiles in the initial view are loaded.
|
|
43842
|
+
<p>
|
|
43843
|
+
This event is fired at the end of the frame after the scene is rendered.
|
|
43844
|
+
</p>
|
|
43826
43845
|
* @example
|
|
43827
43846
|
* voxelPrimitive.initialTilesLoaded.addEventListener(function() {
|
|
43828
|
-
|
|
43829
|
-
|
|
43847
|
+
console.log('Initial tiles are loaded');
|
|
43848
|
+
});
|
|
43830
43849
|
*/
|
|
43831
43850
|
initialTilesLoaded: Event;
|
|
43832
43851
|
/**
|
|
@@ -43887,35 +43906,35 @@ export class VoxelPrimitive {
|
|
|
43887
43906
|
nearestSampling: boolean;
|
|
43888
43907
|
/**
|
|
43889
43908
|
* Gets or sets the screen space error in pixels. If the screen space size
|
|
43890
|
-
|
|
43891
|
-
|
|
43892
|
-
|
|
43909
|
+
of a voxel is greater than the screen space error, the tile is subdivided.
|
|
43910
|
+
Lower screen space error corresponds with higher detail rendering, but could
|
|
43911
|
+
result in worse performance and higher memory consumption.
|
|
43893
43912
|
*/
|
|
43894
43913
|
screenSpaceError: number;
|
|
43895
43914
|
/**
|
|
43896
43915
|
* Gets or sets the step size multiplier used during raymarching.
|
|
43897
|
-
|
|
43898
|
-
|
|
43916
|
+
The lower the value, the higher the rendering quality, but
|
|
43917
|
+
also the worse the performance.
|
|
43899
43918
|
*/
|
|
43900
43919
|
stepSize: number;
|
|
43901
43920
|
/**
|
|
43902
43921
|
* Gets or sets the minimum bounds in the shape's local coordinate system.
|
|
43903
|
-
|
|
43922
|
+
Voxel data is stretched or squashed to fit the bounds.
|
|
43904
43923
|
*/
|
|
43905
43924
|
minBounds: Cartesian3;
|
|
43906
43925
|
/**
|
|
43907
43926
|
* Gets or sets the maximum bounds in the shape's local coordinate system.
|
|
43908
|
-
|
|
43927
|
+
Voxel data is stretched or squashed to fit the bounds.
|
|
43909
43928
|
*/
|
|
43910
43929
|
maxBounds: Cartesian3;
|
|
43911
43930
|
/**
|
|
43912
43931
|
* Gets or sets the minimum clipping location in the shape's local coordinate system.
|
|
43913
|
-
|
|
43932
|
+
Any voxel content outside the range is clipped.
|
|
43914
43933
|
*/
|
|
43915
43934
|
minClippingBounds: Cartesian3;
|
|
43916
43935
|
/**
|
|
43917
43936
|
* Gets or sets the maximum clipping location in the shape's local coordinate system.
|
|
43918
|
-
|
|
43937
|
+
Any voxel content outside the range is clipped.
|
|
43919
43938
|
*/
|
|
43920
43939
|
maxClippingBounds: Cartesian3;
|
|
43921
43940
|
/**
|
|
@@ -43932,19 +43951,19 @@ export class VoxelPrimitive {
|
|
|
43932
43951
|
readonly customShaderCompilationEvent: Event;
|
|
43933
43952
|
/**
|
|
43934
43953
|
* Returns true if this object was destroyed; otherwise, false.
|
|
43935
|
-
|
|
43936
|
-
|
|
43937
|
-
|
|
43954
|
+
<br /><br />
|
|
43955
|
+
If this object was destroyed, it should not be used; calling any function other than
|
|
43956
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
43938
43957
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
43939
43958
|
*/
|
|
43940
43959
|
isDestroyed(): boolean;
|
|
43941
43960
|
/**
|
|
43942
43961
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
43943
|
-
|
|
43944
|
-
|
|
43945
|
-
|
|
43946
|
-
|
|
43947
|
-
|
|
43962
|
+
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
43963
|
+
<br /><br />
|
|
43964
|
+
Once an object is destroyed, it should not be used; calling any function other than
|
|
43965
|
+
<code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
43966
|
+
assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
43948
43967
|
* @example
|
|
43949
43968
|
* voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
|
|
43950
43969
|
*/
|
|
@@ -43953,7 +43972,7 @@ export class VoxelPrimitive {
|
|
|
43953
43972
|
|
|
43954
43973
|
/**
|
|
43955
43974
|
* Provides voxel data. Intended to be used with {@link VoxelPrimitive}.
|
|
43956
|
-
|
|
43975
|
+
This type describes an interface and is not intended to be instantiated directly.
|
|
43957
43976
|
*/
|
|
43958
43977
|
export class VoxelProvider {
|
|
43959
43978
|
constructor();
|
|
@@ -43967,69 +43986,69 @@ export class VoxelProvider {
|
|
|
43967
43986
|
readonly shapeTransform: Matrix4 | undefined;
|
|
43968
43987
|
/**
|
|
43969
43988
|
* Gets the {@link VoxelShapeType}
|
|
43970
|
-
|
|
43989
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43971
43990
|
*/
|
|
43972
43991
|
readonly shape: VoxelShapeType;
|
|
43973
43992
|
/**
|
|
43974
43993
|
* Gets the minimum bounds.
|
|
43975
|
-
|
|
43976
|
-
|
|
43994
|
+
If undefined, the shape's default minimum bounds will be used instead.
|
|
43995
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43977
43996
|
*/
|
|
43978
43997
|
readonly minBounds: Cartesian3 | undefined;
|
|
43979
43998
|
/**
|
|
43980
43999
|
* Gets the maximum bounds.
|
|
43981
|
-
|
|
43982
|
-
|
|
44000
|
+
If undefined, the shape's default maximum bounds will be used instead.
|
|
44001
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43983
44002
|
*/
|
|
43984
44003
|
readonly maxBounds: Cartesian3 | undefined;
|
|
43985
44004
|
/**
|
|
43986
44005
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
43987
|
-
|
|
44006
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43988
44007
|
*/
|
|
43989
44008
|
readonly dimensions: Cartesian3;
|
|
43990
44009
|
/**
|
|
43991
44010
|
* 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.
|
|
43992
|
-
|
|
44011
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43993
44012
|
*/
|
|
43994
44013
|
readonly paddingBefore: Cartesian3 | undefined;
|
|
43995
44014
|
/**
|
|
43996
44015
|
* 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.
|
|
43997
|
-
|
|
44016
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43998
44017
|
*/
|
|
43999
44018
|
readonly paddingAfter: Cartesian3 | undefined;
|
|
44000
44019
|
/**
|
|
44001
44020
|
* Gets the metadata names.
|
|
44002
|
-
|
|
44021
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44003
44022
|
*/
|
|
44004
44023
|
readonly names: string[];
|
|
44005
44024
|
/**
|
|
44006
44025
|
* Gets the metadata types.
|
|
44007
|
-
|
|
44026
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44008
44027
|
*/
|
|
44009
44028
|
readonly types: MetadataType[];
|
|
44010
44029
|
/**
|
|
44011
44030
|
* Gets the metadata component types.
|
|
44012
|
-
|
|
44031
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44013
44032
|
*/
|
|
44014
44033
|
readonly componentTypes: MetadataComponentType[];
|
|
44015
44034
|
/**
|
|
44016
44035
|
* Gets the metadata minimum values.
|
|
44017
|
-
|
|
44036
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44018
44037
|
*/
|
|
44019
44038
|
readonly minimumValues: number[][] | undefined;
|
|
44020
44039
|
/**
|
|
44021
44040
|
* Gets the metadata maximum values.
|
|
44022
|
-
|
|
44041
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44023
44042
|
*/
|
|
44024
44043
|
readonly maximumValues: number[][] | undefined;
|
|
44025
44044
|
/**
|
|
44026
44045
|
* 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.
|
|
44027
|
-
|
|
44046
|
+
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44028
44047
|
*/
|
|
44029
44048
|
readonly maximumTileCount: number | undefined;
|
|
44030
44049
|
/**
|
|
44031
44050
|
* Requests the data for a given tile. The data is a flattened 3D array ordered by X, then Y, then Z.
|
|
44032
|
-
|
|
44051
|
+
This function should not be called before {@link VoxelProvider#ready} returns true.
|
|
44033
44052
|
* @param [options] - Object with the following properties:
|
|
44034
44053
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
44035
44054
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
@@ -44099,31 +44118,31 @@ export namespace WebMapServiceImageryProvider {
|
|
|
44099
44118
|
* @property [parameters = WebMapServiceImageryProvider.DefaultParameters] - Additional parameters to pass to the WMS server in the GetMap URL.
|
|
44100
44119
|
* @property [getFeatureInfoParameters = WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] - Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
|
|
44101
44120
|
* @property [enablePickFeatures = true] - If true, {@link WebMapServiceImageryProvider#pickFeatures} will invoke
|
|
44102
|
-
|
|
44103
|
-
|
|
44104
|
-
|
|
44105
|
-
|
|
44106
|
-
|
|
44121
|
+
* the GetFeatureInfo operation on the WMS server and return the features included in the response. If false,
|
|
44122
|
+
* {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable features)
|
|
44123
|
+
* without communicating with the server. Set this property to false if you know your WMS server does not support
|
|
44124
|
+
* GetFeatureInfo or if you don't want this provider's features to be pickable. Note that this can be dynamically
|
|
44125
|
+
* overridden by modifying the WebMapServiceImageryProvider#enablePickFeatures property.
|
|
44107
44126
|
* @property [getFeatureInfoFormats = WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] - The formats
|
|
44108
|
-
|
|
44127
|
+
* in which to try WMS GetFeatureInfo requests.
|
|
44109
44128
|
* @property [rectangle = Rectangle.MAX_VALUE] - The rectangle of the layer.
|
|
44110
44129
|
* @property [tilingScheme = new GeographicTilingScheme()] - The tiling scheme to use to divide the world into tiles.
|
|
44111
44130
|
* @property [ellipsoid] - The ellipsoid. If the tilingScheme is specified,
|
|
44112
|
-
|
|
44113
|
-
|
|
44131
|
+
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
|
|
44132
|
+
* parameter is specified, the WGS84 ellipsoid is used.
|
|
44114
44133
|
* @property [tileWidth = 256] - The width of each tile in pixels.
|
|
44115
44134
|
* @property [tileHeight = 256] - The height of each tile in pixels.
|
|
44116
44135
|
* @property [minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider. Take care when
|
|
44117
|
-
|
|
44118
|
-
|
|
44136
|
+
* specifying this that the number of tiles at the minimum level is small, such as four or less. A larger number is
|
|
44137
|
+
* likely to result in rendering problems.
|
|
44119
44138
|
* @property [maximumLevel] - The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
|
|
44120
|
-
|
|
44139
|
+
* If not specified, there is no limit.
|
|
44121
44140
|
* @property [crs] - CRS specification, for use with WMS specification >= 1.3.0.
|
|
44122
44141
|
* @property [srs] - SRS specification, for use with WMS specification 1.1.0 or 1.1.1
|
|
44123
44142
|
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
44124
44143
|
* @property [subdomains = 'abc'] - The subdomains to use for the <code>{s}</code> placeholder in the URL template.
|
|
44125
|
-
|
|
44126
|
-
|
|
44144
|
+
* If this parameter is a single string, each character in the string is a subdomain. If it is
|
|
44145
|
+
* an array, each element in the array is a subdomain.
|
|
44127
44146
|
* @property [clock] - A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
|
|
44128
44147
|
* @property [times] - TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.
|
|
44129
44148
|
* @property [getFeatureInfoUrl] - The getFeatureInfo URL of the WMS service. If the property is not defined then we use the property value of url.
|
|
@@ -44156,12 +44175,12 @@ export namespace WebMapServiceImageryProvider {
|
|
|
44156
44175
|
* Provides tiled imagery hosted by a Web Map Service (WMS) server.
|
|
44157
44176
|
* @example
|
|
44158
44177
|
* const provider = new Cesium.WebMapServiceImageryProvider({
|
|
44159
|
-
|
|
44160
|
-
|
|
44161
|
-
|
|
44162
|
-
});
|
|
44163
|
-
const imageryLayer = new Cesium.ImageryLayer(provider);
|
|
44164
|
-
viewer.imageryLayers.add(imageryLayer);
|
|
44178
|
+
* url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer',
|
|
44179
|
+
* layers : '0',
|
|
44180
|
+
* proxy: new Cesium.DefaultProxy('/proxy/')
|
|
44181
|
+
* });
|
|
44182
|
+
* const imageryLayer = new Cesium.ImageryLayer(provider);
|
|
44183
|
+
* viewer.imageryLayers.add(imageryLayer);
|
|
44165
44184
|
* @param options - Object describing initialization options
|
|
44166
44185
|
*/
|
|
44167
44186
|
export class WebMapServiceImageryProvider {
|
|
@@ -44202,234 +44221,6 @@ export class WebMapServiceImageryProvider {
|
|
|
44202
44221
|
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
44203
44222
|
*/
|
|
44204
44223
|
readonly rectangle: Rectangle;
|
|
44205
|
-
/**
|
|
44206
|
-
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
44207
|
-
for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
44208
|
-
returns undefined, no tiles are filtered.
|
|
44209
|
-
*/
|
|
44210
|
-
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
44211
|
-
/**
|
|
44212
|
-
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
44213
|
-
to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
44214
|
-
are passed an instance of {@link TileProviderError}.
|
|
44215
|
-
*/
|
|
44216
|
-
readonly errorEvent: Event;
|
|
44217
|
-
/**
|
|
44218
|
-
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
44219
|
-
the source of the imagery.
|
|
44220
|
-
*/
|
|
44221
|
-
readonly credit: Credit;
|
|
44222
|
-
/**
|
|
44223
|
-
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
44224
|
-
include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
44225
|
-
be ignored. If this property is true, any images without an alpha channel will be treated
|
|
44226
|
-
as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
44227
|
-
and texture upload time are reduced.
|
|
44228
|
-
*/
|
|
44229
|
-
readonly hasAlphaChannel: boolean;
|
|
44230
|
-
/**
|
|
44231
|
-
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link WebMapServiceImageryProvider#pickFeatures} will
|
|
44232
|
-
invoke the <code>GetFeatureInfo</code> service on the WMS server and attempt to interpret the features included in the response. If false,
|
|
44233
|
-
{@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
|
|
44234
|
-
features) without communicating with the server. Set this property to false if you know your data
|
|
44235
|
-
source does not support picking features or if you don't want this provider's features to be pickable.
|
|
44236
|
-
*/
|
|
44237
|
-
enablePickFeatures: boolean;
|
|
44238
|
-
/**
|
|
44239
|
-
* Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
|
|
44240
|
-
*/
|
|
44241
|
-
clock: Clock;
|
|
44242
|
-
/**
|
|
44243
|
-
* Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
|
|
44244
|
-
TimeInterval is an object containing the keys and values of the properties that are used during
|
|
44245
|
-
tile requests.
|
|
44246
|
-
*/
|
|
44247
|
-
times: TimeIntervalCollection;
|
|
44248
|
-
/**
|
|
44249
|
-
* Gets the getFeatureInfo URL of the WMS server.
|
|
44250
|
-
*/
|
|
44251
|
-
readonly getFeatureInfoUrl: Resource | string;
|
|
44252
|
-
/**
|
|
44253
|
-
* Gets the credits to be displayed when a given tile is displayed.
|
|
44254
|
-
* @param x - The tile X coordinate.
|
|
44255
|
-
* @param y - The tile Y coordinate.
|
|
44256
|
-
* @param level - The tile level;
|
|
44257
|
-
* @returns The credits to be displayed when the tile is displayed.
|
|
44258
|
-
*/
|
|
44259
|
-
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
44260
|
-
/**
|
|
44261
|
-
* Requests the image for a given tile.
|
|
44262
|
-
* @param x - The tile X coordinate.
|
|
44263
|
-
* @param y - The tile Y coordinate.
|
|
44264
|
-
* @param level - The tile level.
|
|
44265
|
-
* @param [request] - The request object. Intended for internal use only.
|
|
44266
|
-
* @returns A promise for the image that will resolve when the image is available, or
|
|
44267
|
-
undefined if there are too many active requests to the server, and the request should be retried later.
|
|
44268
|
-
*/
|
|
44269
|
-
requestImage(x: number, y: number, level: number, request?: Request): Promise<ImageryTypes> | undefined;
|
|
44270
|
-
/**
|
|
44271
|
-
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
|
|
44272
|
-
a tile.
|
|
44273
|
-
* @param x - The tile X coordinate.
|
|
44274
|
-
* @param y - The tile Y coordinate.
|
|
44275
|
-
* @param level - The tile level.
|
|
44276
|
-
* @param longitude - The longitude at which to pick features.
|
|
44277
|
-
* @param latitude - The latitude at which to pick features.
|
|
44278
|
-
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
44279
|
-
picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
44280
|
-
instances. The array may be empty if no features are found at the given location.
|
|
44281
|
-
*/
|
|
44282
|
-
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
44283
|
-
/**
|
|
44284
|
-
* The default parameters to include in the WMS URL to obtain images. The values are as follows:
|
|
44285
|
-
service=WMS
|
|
44286
|
-
version=1.1.1
|
|
44287
|
-
request=GetMap
|
|
44288
|
-
styles=
|
|
44289
|
-
format=image/jpeg
|
|
44290
|
-
*/
|
|
44291
|
-
static readonly DefaultParameters: any;
|
|
44292
|
-
/**
|
|
44293
|
-
* The default parameters to include in the WMS URL to get feature information. The values are as follows:
|
|
44294
|
-
service=WMS
|
|
44295
|
-
version=1.1.1
|
|
44296
|
-
request=GetFeatureInfo
|
|
44297
|
-
*/
|
|
44298
|
-
static readonly GetFeatureInfoDefaultParameters: any;
|
|
44299
|
-
}
|
|
44300
|
-
|
|
44301
|
-
export namespace WebMapTileServiceImageryProvider {
|
|
44302
|
-
/**
|
|
44303
|
-
* Initialization options for the WebMapTileServiceImageryProvider constructor
|
|
44304
|
-
* @property url - The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.
|
|
44305
|
-
* @property [format = 'image/jpeg'] - The MIME type for images to retrieve from the server.
|
|
44306
|
-
* @property layer - The layer name for WMTS requests.
|
|
44307
|
-
* @property style - The style name for WMTS requests.
|
|
44308
|
-
* @property tileMatrixSetID - The identifier of the TileMatrixSet to use for WMTS requests.
|
|
44309
|
-
* @property [tileMatrixLabels] - A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.
|
|
44310
|
-
* @property [clock] - A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
|
|
44311
|
-
* @property [times] - TimeIntervalCollection with its <code>data</code> property being an object containing time dynamic dimension and their values.
|
|
44312
|
-
* @property [dimensions] - A object containing static dimensions and their values.
|
|
44313
|
-
* @property [tileWidth = 256] - The tile width in pixels.
|
|
44314
|
-
* @property [tileHeight = 256] - The tile height in pixels.
|
|
44315
|
-
* @property [tilingScheme] - The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.
|
|
44316
|
-
* @property [rectangle = Rectangle.MAX_VALUE] - The rectangle covered by the layer.
|
|
44317
|
-
* @property [minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider.
|
|
44318
|
-
* @property [maximumLevel] - The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
|
|
44319
|
-
* @property [ellipsoid] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
44320
|
-
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
44321
|
-
* @property [subdomains = 'abc'] - The subdomains to use for the <code>{s}</code> placeholder in the URL template.
|
|
44322
|
-
* If this parameter is a single string, each character in the string is a subdomain. If it is
|
|
44323
|
-
* an array, each element in the array is a subdomain.
|
|
44324
|
-
*/
|
|
44325
|
-
type ConstructorOptions = {
|
|
44326
|
-
url: Resource | string;
|
|
44327
|
-
format?: string;
|
|
44328
|
-
layer: string;
|
|
44329
|
-
style: string;
|
|
44330
|
-
tileMatrixSetID: string;
|
|
44331
|
-
tileMatrixLabels?: any[];
|
|
44332
|
-
clock?: Clock;
|
|
44333
|
-
times?: TimeIntervalCollection;
|
|
44334
|
-
dimensions?: any;
|
|
44335
|
-
tileWidth?: number;
|
|
44336
|
-
tileHeight?: number;
|
|
44337
|
-
tilingScheme?: TilingScheme;
|
|
44338
|
-
rectangle?: Rectangle;
|
|
44339
|
-
minimumLevel?: number;
|
|
44340
|
-
maximumLevel?: number;
|
|
44341
|
-
ellipsoid?: Ellipsoid;
|
|
44342
|
-
credit?: Credit | string;
|
|
44343
|
-
subdomains?: string | string[];
|
|
44344
|
-
};
|
|
44345
|
-
}
|
|
44346
|
-
|
|
44347
|
-
/**
|
|
44348
|
-
* Provides tiled imagery served by {@link http://www.opengeospatial.org/standards/wmts|WMTS 1.0.0} compliant servers.
|
|
44349
|
-
* This provider supports HTTP KVP-encoded and RESTful GetTile requests, but does not yet support the SOAP encoding.
|
|
44350
|
-
* @example
|
|
44351
|
-
* // Example 1. USGS shaded relief tiles (KVP)
|
|
44352
|
-
* const shadedRelief1 = new Cesium.WebMapTileServiceImageryProvider({
|
|
44353
|
-
* url : 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS',
|
|
44354
|
-
* layer : 'USGSShadedReliefOnly',
|
|
44355
|
-
* style : 'default',
|
|
44356
|
-
* format : 'image/jpeg',
|
|
44357
|
-
* tileMatrixSetID : 'default028mm',
|
|
44358
|
-
* // tileMatrixLabels : ['default028mm:0', 'default028mm:1', 'default028mm:2' ...],
|
|
44359
|
-
* maximumLevel: 19,
|
|
44360
|
-
* credit : new Cesium.Credit('U. S. Geological Survey')
|
|
44361
|
-
* });
|
|
44362
|
-
* viewer.imageryLayers.addImageryProvider(shadedRelief1);
|
|
44363
|
-
* @example
|
|
44364
|
-
* // Example 2. USGS shaded relief tiles (RESTful)
|
|
44365
|
-
* const shadedRelief2 = new Cesium.WebMapTileServiceImageryProvider({
|
|
44366
|
-
* url : 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/tile/1.0.0/USGSShadedReliefOnly/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg',
|
|
44367
|
-
* layer : 'USGSShadedReliefOnly',
|
|
44368
|
-
* style : 'default',
|
|
44369
|
-
* format : 'image/jpeg',
|
|
44370
|
-
* tileMatrixSetID : 'default028mm',
|
|
44371
|
-
* maximumLevel: 19,
|
|
44372
|
-
* credit : new Cesium.Credit('U. S. Geological Survey')
|
|
44373
|
-
* });
|
|
44374
|
-
* viewer.imageryLayers.addImageryProvider(shadedRelief2);
|
|
44375
|
-
* @example
|
|
44376
|
-
* // Example 3. NASA time dynamic weather data (RESTful)
|
|
44377
|
-
* const times = Cesium.TimeIntervalCollection.fromIso8601({
|
|
44378
|
-
* iso8601: '2015-07-30/2017-06-16/P1D',
|
|
44379
|
-
* dataCallback: function dataCallback(interval, index) {
|
|
44380
|
-
* return {
|
|
44381
|
-
* Time: Cesium.JulianDate.toIso8601(interval.start)
|
|
44382
|
-
* };
|
|
44383
|
-
* }
|
|
44384
|
-
* });
|
|
44385
|
-
* const weather = new Cesium.WebMapTileServiceImageryProvider({
|
|
44386
|
-
* url : 'https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/AMSR2_Snow_Water_Equivalent/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png',
|
|
44387
|
-
* layer : 'AMSR2_Snow_Water_Equivalent',
|
|
44388
|
-
* style : 'default',
|
|
44389
|
-
* tileMatrixSetID : '2km',
|
|
44390
|
-
* maximumLevel : 5,
|
|
44391
|
-
* format : 'image/png',
|
|
44392
|
-
* clock: clock,
|
|
44393
|
-
* times: times,
|
|
44394
|
-
* credit : new Cesium.Credit('NASA Global Imagery Browse Services for EOSDIS')
|
|
44395
|
-
* });
|
|
44396
|
-
* viewer.imageryLayers.addImageryProvider(weather);
|
|
44397
|
-
* @param options - Object describing initialization options
|
|
44398
|
-
*/
|
|
44399
|
-
export class WebMapTileServiceImageryProvider {
|
|
44400
|
-
constructor(options: WebMapTileServiceImageryProvider.ConstructorOptions);
|
|
44401
|
-
/**
|
|
44402
|
-
* Gets the URL of the service hosting the imagery.
|
|
44403
|
-
*/
|
|
44404
|
-
readonly url: string;
|
|
44405
|
-
/**
|
|
44406
|
-
* Gets the proxy used by this provider.
|
|
44407
|
-
*/
|
|
44408
|
-
readonly proxy: Proxy;
|
|
44409
|
-
/**
|
|
44410
|
-
* Gets the width of each tile, in pixels.
|
|
44411
|
-
*/
|
|
44412
|
-
readonly tileWidth: number;
|
|
44413
|
-
/**
|
|
44414
|
-
* Gets the height of each tile, in pixels.
|
|
44415
|
-
*/
|
|
44416
|
-
readonly tileHeight: number;
|
|
44417
|
-
/**
|
|
44418
|
-
* Gets the maximum level-of-detail that can be requested.
|
|
44419
|
-
*/
|
|
44420
|
-
readonly maximumLevel: number | undefined;
|
|
44421
|
-
/**
|
|
44422
|
-
* Gets the minimum level-of-detail that can be requested.
|
|
44423
|
-
*/
|
|
44424
|
-
readonly minimumLevel: number;
|
|
44425
|
-
/**
|
|
44426
|
-
* Gets the tiling scheme used by this provider.
|
|
44427
|
-
*/
|
|
44428
|
-
readonly tilingScheme: TilingScheme;
|
|
44429
|
-
/**
|
|
44430
|
-
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
44431
|
-
*/
|
|
44432
|
-
readonly rectangle: Rectangle;
|
|
44433
44224
|
/**
|
|
44434
44225
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
44435
44226
|
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
@@ -44442,10 +44233,6 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44442
44233
|
* are passed an instance of {@link TileProviderError}.
|
|
44443
44234
|
*/
|
|
44444
44235
|
readonly errorEvent: Event;
|
|
44445
|
-
/**
|
|
44446
|
-
* Gets the mime type of images returned by this imagery provider.
|
|
44447
|
-
*/
|
|
44448
|
-
readonly format: string;
|
|
44449
44236
|
/**
|
|
44450
44237
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
44451
44238
|
* the source of the imagery.
|
|
@@ -44459,6 +44246,14 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44459
44246
|
* and texture upload time are reduced.
|
|
44460
44247
|
*/
|
|
44461
44248
|
readonly hasAlphaChannel: boolean;
|
|
44249
|
+
/**
|
|
44250
|
+
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link WebMapServiceImageryProvider#pickFeatures} will
|
|
44251
|
+
* invoke the <code>GetFeatureInfo</code> service on the WMS server and attempt to interpret the features included in the response. If false,
|
|
44252
|
+
* {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
|
|
44253
|
+
* features) without communicating with the server. Set this property to false if you know your data
|
|
44254
|
+
* source does not support picking features or if you don't want this provider's features to be pickable.
|
|
44255
|
+
*/
|
|
44256
|
+
enablePickFeatures: boolean;
|
|
44462
44257
|
/**
|
|
44463
44258
|
* Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
|
|
44464
44259
|
*/
|
|
@@ -44469,6 +44264,230 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44469
44264
|
* tile requests.
|
|
44470
44265
|
*/
|
|
44471
44266
|
times: TimeIntervalCollection;
|
|
44267
|
+
/**
|
|
44268
|
+
* Gets the getFeatureInfo URL of the WMS server.
|
|
44269
|
+
*/
|
|
44270
|
+
readonly getFeatureInfoUrl: Resource | string;
|
|
44271
|
+
/**
|
|
44272
|
+
* Gets the credits to be displayed when a given tile is displayed.
|
|
44273
|
+
* @param x - The tile X coordinate.
|
|
44274
|
+
* @param y - The tile Y coordinate.
|
|
44275
|
+
* @param level - The tile level;
|
|
44276
|
+
* @returns The credits to be displayed when the tile is displayed.
|
|
44277
|
+
*/
|
|
44278
|
+
getTileCredits(x: number, y: number, level: number): Credit[];
|
|
44279
|
+
/**
|
|
44280
|
+
* Requests the image for a given tile.
|
|
44281
|
+
* @param x - The tile X coordinate.
|
|
44282
|
+
* @param y - The tile Y coordinate.
|
|
44283
|
+
* @param level - The tile level.
|
|
44284
|
+
* @param [request] - The request object. Intended for internal use only.
|
|
44285
|
+
* @returns A promise for the image that will resolve when the image is available, or
|
|
44286
|
+
* undefined if there are too many active requests to the server, and the request should be retried later.
|
|
44287
|
+
*/
|
|
44288
|
+
requestImage(x: number, y: number, level: number, request?: Request): Promise<ImageryTypes> | undefined;
|
|
44289
|
+
/**
|
|
44290
|
+
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
|
|
44291
|
+
* a tile.
|
|
44292
|
+
* @param x - The tile X coordinate.
|
|
44293
|
+
* @param y - The tile Y coordinate.
|
|
44294
|
+
* @param level - The tile level.
|
|
44295
|
+
* @param longitude - The longitude at which to pick features.
|
|
44296
|
+
* @param latitude - The latitude at which to pick features.
|
|
44297
|
+
* @returns A promise for the picked features that will resolve when the asynchronous
|
|
44298
|
+
* picking completes. The resolved value is an array of {@link ImageryLayerFeatureInfo}
|
|
44299
|
+
* instances. The array may be empty if no features are found at the given location.
|
|
44300
|
+
*/
|
|
44301
|
+
pickFeatures(x: number, y: number, level: number, longitude: number, latitude: number): Promise<ImageryLayerFeatureInfo[]> | undefined;
|
|
44302
|
+
/**
|
|
44303
|
+
* The default parameters to include in the WMS URL to obtain images. The values are as follows:
|
|
44304
|
+
* service=WMS
|
|
44305
|
+
* version=1.1.1
|
|
44306
|
+
* request=GetMap
|
|
44307
|
+
* styles=
|
|
44308
|
+
* format=image/jpeg
|
|
44309
|
+
*/
|
|
44310
|
+
static readonly DefaultParameters: any;
|
|
44311
|
+
/**
|
|
44312
|
+
* The default parameters to include in the WMS URL to get feature information. The values are as follows:
|
|
44313
|
+
* service=WMS
|
|
44314
|
+
* version=1.1.1
|
|
44315
|
+
* request=GetFeatureInfo
|
|
44316
|
+
*/
|
|
44317
|
+
static readonly GetFeatureInfoDefaultParameters: any;
|
|
44318
|
+
}
|
|
44319
|
+
|
|
44320
|
+
export namespace WebMapTileServiceImageryProvider {
|
|
44321
|
+
/**
|
|
44322
|
+
* Initialization options for the WebMapTileServiceImageryProvider constructor
|
|
44323
|
+
* @property url - The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.
|
|
44324
|
+
* @property [format = 'image/jpeg'] - The MIME type for images to retrieve from the server.
|
|
44325
|
+
* @property layer - The layer name for WMTS requests.
|
|
44326
|
+
* @property style - The style name for WMTS requests.
|
|
44327
|
+
* @property tileMatrixSetID - The identifier of the TileMatrixSet to use for WMTS requests.
|
|
44328
|
+
* @property [tileMatrixLabels] - A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.
|
|
44329
|
+
* @property [clock] - A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
|
|
44330
|
+
* @property [times] - TimeIntervalCollection with its <code>data</code> property being an object containing time dynamic dimension and their values.
|
|
44331
|
+
* @property [dimensions] - A object containing static dimensions and their values.
|
|
44332
|
+
* @property [tileWidth = 256] - The tile width in pixels.
|
|
44333
|
+
* @property [tileHeight = 256] - The tile height in pixels.
|
|
44334
|
+
* @property [tilingScheme] - The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.
|
|
44335
|
+
* @property [rectangle = Rectangle.MAX_VALUE] - The rectangle covered by the layer.
|
|
44336
|
+
* @property [minimumLevel = 0] - The minimum level-of-detail supported by the imagery provider.
|
|
44337
|
+
* @property [maximumLevel] - The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
|
|
44338
|
+
* @property [ellipsoid] - The ellipsoid. If not specified, the WGS84 ellipsoid is used.
|
|
44339
|
+
* @property [credit] - A credit for the data source, which is displayed on the canvas.
|
|
44340
|
+
* @property [subdomains = 'abc'] - The subdomains to use for the <code>{s}</code> placeholder in the URL template.
|
|
44341
|
+
If this parameter is a single string, each character in the string is a subdomain. If it is
|
|
44342
|
+
an array, each element in the array is a subdomain.
|
|
44343
|
+
*/
|
|
44344
|
+
type ConstructorOptions = {
|
|
44345
|
+
url: Resource | string;
|
|
44346
|
+
format?: string;
|
|
44347
|
+
layer: string;
|
|
44348
|
+
style: string;
|
|
44349
|
+
tileMatrixSetID: string;
|
|
44350
|
+
tileMatrixLabels?: any[];
|
|
44351
|
+
clock?: Clock;
|
|
44352
|
+
times?: TimeIntervalCollection;
|
|
44353
|
+
dimensions?: any;
|
|
44354
|
+
tileWidth?: number;
|
|
44355
|
+
tileHeight?: number;
|
|
44356
|
+
tilingScheme?: TilingScheme;
|
|
44357
|
+
rectangle?: Rectangle;
|
|
44358
|
+
minimumLevel?: number;
|
|
44359
|
+
maximumLevel?: number;
|
|
44360
|
+
ellipsoid?: Ellipsoid;
|
|
44361
|
+
credit?: Credit | string;
|
|
44362
|
+
subdomains?: string | string[];
|
|
44363
|
+
};
|
|
44364
|
+
}
|
|
44365
|
+
|
|
44366
|
+
/**
|
|
44367
|
+
* Provides tiled imagery served by {@link http://www.opengeospatial.org/standards/wmts|WMTS 1.0.0} compliant servers.
|
|
44368
|
+
This provider supports HTTP KVP-encoded and RESTful GetTile requests, but does not yet support the SOAP encoding.
|
|
44369
|
+
* @example
|
|
44370
|
+
* // Example 1. USGS shaded relief tiles (KVP)
|
|
44371
|
+
const shadedRelief1 = new Cesium.WebMapTileServiceImageryProvider({
|
|
44372
|
+
url : 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS',
|
|
44373
|
+
layer : 'USGSShadedReliefOnly',
|
|
44374
|
+
style : 'default',
|
|
44375
|
+
format : 'image/jpeg',
|
|
44376
|
+
tileMatrixSetID : 'default028mm',
|
|
44377
|
+
// tileMatrixLabels : ['default028mm:0', 'default028mm:1', 'default028mm:2' ...],
|
|
44378
|
+
maximumLevel: 19,
|
|
44379
|
+
credit : new Cesium.Credit('U. S. Geological Survey')
|
|
44380
|
+
});
|
|
44381
|
+
viewer.imageryLayers.addImageryProvider(shadedRelief1);
|
|
44382
|
+
* @example
|
|
44383
|
+
* // Example 2. USGS shaded relief tiles (RESTful)
|
|
44384
|
+
const shadedRelief2 = new Cesium.WebMapTileServiceImageryProvider({
|
|
44385
|
+
url : 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/tile/1.0.0/USGSShadedReliefOnly/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpg',
|
|
44386
|
+
layer : 'USGSShadedReliefOnly',
|
|
44387
|
+
style : 'default',
|
|
44388
|
+
format : 'image/jpeg',
|
|
44389
|
+
tileMatrixSetID : 'default028mm',
|
|
44390
|
+
maximumLevel: 19,
|
|
44391
|
+
credit : new Cesium.Credit('U. S. Geological Survey')
|
|
44392
|
+
});
|
|
44393
|
+
viewer.imageryLayers.addImageryProvider(shadedRelief2);
|
|
44394
|
+
* @example
|
|
44395
|
+
* // Example 3. NASA time dynamic weather data (RESTful)
|
|
44396
|
+
const times = Cesium.TimeIntervalCollection.fromIso8601({
|
|
44397
|
+
iso8601: '2015-07-30/2017-06-16/P1D',
|
|
44398
|
+
dataCallback: function dataCallback(interval, index) {
|
|
44399
|
+
return {
|
|
44400
|
+
Time: Cesium.JulianDate.toIso8601(interval.start)
|
|
44401
|
+
};
|
|
44402
|
+
}
|
|
44403
|
+
});
|
|
44404
|
+
const weather = new Cesium.WebMapTileServiceImageryProvider({
|
|
44405
|
+
url : 'https://gibs.earthdata.nasa.gov/wmts/epsg4326/best/AMSR2_Snow_Water_Equivalent/default/{Time}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png',
|
|
44406
|
+
layer : 'AMSR2_Snow_Water_Equivalent',
|
|
44407
|
+
style : 'default',
|
|
44408
|
+
tileMatrixSetID : '2km',
|
|
44409
|
+
maximumLevel : 5,
|
|
44410
|
+
format : 'image/png',
|
|
44411
|
+
clock: clock,
|
|
44412
|
+
times: times,
|
|
44413
|
+
credit : new Cesium.Credit('NASA Global Imagery Browse Services for EOSDIS')
|
|
44414
|
+
});
|
|
44415
|
+
viewer.imageryLayers.addImageryProvider(weather);
|
|
44416
|
+
* @param options - Object describing initialization options
|
|
44417
|
+
*/
|
|
44418
|
+
export class WebMapTileServiceImageryProvider {
|
|
44419
|
+
constructor(options: WebMapTileServiceImageryProvider.ConstructorOptions);
|
|
44420
|
+
/**
|
|
44421
|
+
* Gets the URL of the service hosting the imagery.
|
|
44422
|
+
*/
|
|
44423
|
+
readonly url: string;
|
|
44424
|
+
/**
|
|
44425
|
+
* Gets the proxy used by this provider.
|
|
44426
|
+
*/
|
|
44427
|
+
readonly proxy: Proxy;
|
|
44428
|
+
/**
|
|
44429
|
+
* Gets the width of each tile, in pixels.
|
|
44430
|
+
*/
|
|
44431
|
+
readonly tileWidth: number;
|
|
44432
|
+
/**
|
|
44433
|
+
* Gets the height of each tile, in pixels.
|
|
44434
|
+
*/
|
|
44435
|
+
readonly tileHeight: number;
|
|
44436
|
+
/**
|
|
44437
|
+
* Gets the maximum level-of-detail that can be requested.
|
|
44438
|
+
*/
|
|
44439
|
+
readonly maximumLevel: number | undefined;
|
|
44440
|
+
/**
|
|
44441
|
+
* Gets the minimum level-of-detail that can be requested.
|
|
44442
|
+
*/
|
|
44443
|
+
readonly minimumLevel: number;
|
|
44444
|
+
/**
|
|
44445
|
+
* Gets the tiling scheme used by this provider.
|
|
44446
|
+
*/
|
|
44447
|
+
readonly tilingScheme: TilingScheme;
|
|
44448
|
+
/**
|
|
44449
|
+
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
44450
|
+
*/
|
|
44451
|
+
readonly rectangle: Rectangle;
|
|
44452
|
+
/**
|
|
44453
|
+
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
44454
|
+
for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
44455
|
+
returns undefined, no tiles are filtered.
|
|
44456
|
+
*/
|
|
44457
|
+
readonly tileDiscardPolicy: TileDiscardPolicy;
|
|
44458
|
+
/**
|
|
44459
|
+
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
44460
|
+
to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
44461
|
+
are passed an instance of {@link TileProviderError}.
|
|
44462
|
+
*/
|
|
44463
|
+
readonly errorEvent: Event;
|
|
44464
|
+
/**
|
|
44465
|
+
* Gets the mime type of images returned by this imagery provider.
|
|
44466
|
+
*/
|
|
44467
|
+
readonly format: string;
|
|
44468
|
+
/**
|
|
44469
|
+
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
44470
|
+
the source of the imagery.
|
|
44471
|
+
*/
|
|
44472
|
+
readonly credit: Credit;
|
|
44473
|
+
/**
|
|
44474
|
+
* Gets a value indicating whether or not the images provided by this imagery provider
|
|
44475
|
+
include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
44476
|
+
be ignored. If this property is true, any images without an alpha channel will be treated
|
|
44477
|
+
as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
44478
|
+
and texture upload time are reduced.
|
|
44479
|
+
*/
|
|
44480
|
+
readonly hasAlphaChannel: boolean;
|
|
44481
|
+
/**
|
|
44482
|
+
* Gets or sets a clock that is used to get keep the time used for time dynamic parameters.
|
|
44483
|
+
*/
|
|
44484
|
+
clock: Clock;
|
|
44485
|
+
/**
|
|
44486
|
+
* Gets or sets a time interval collection that is used to get time dynamic parameters. The data of each
|
|
44487
|
+
TimeInterval is an object containing the keys and values of the properties that are used during
|
|
44488
|
+
tile requests.
|
|
44489
|
+
*/
|
|
44490
|
+
times: TimeIntervalCollection;
|
|
44472
44491
|
/**
|
|
44473
44492
|
* Gets or sets an object that contains static dimensions and their values.
|
|
44474
44493
|
*/
|
|
@@ -44488,12 +44507,12 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44488
44507
|
* @param level - The tile level.
|
|
44489
44508
|
* @param [request] - The request object. Intended for internal use only.
|
|
44490
44509
|
* @returns A promise for the image that will resolve when the image is available, or
|
|
44491
|
-
|
|
44510
|
+
undefined if there are too many active requests to the server, and the request should be retried later.
|
|
44492
44511
|
*/
|
|
44493
44512
|
requestImage(x: number, y: number, level: number, request?: Request): Promise<ImageryTypes> | undefined;
|
|
44494
44513
|
/**
|
|
44495
44514
|
* Picking features is not currently supported by this imagery provider, so this function simply returns
|
|
44496
|
-
|
|
44515
|
+
undefined.
|
|
44497
44516
|
* @param x - The tile X coordinate.
|
|
44498
44517
|
* @param y - The tile Y coordinate.
|
|
44499
44518
|
* @param level - The tile level.
|
|
@@ -44508,29 +44527,29 @@ export class WebMapTileServiceImageryProvider {
|
|
|
44508
44527
|
* A widget containing a Cesium scene.
|
|
44509
44528
|
* @example
|
|
44510
44529
|
* // For each example, include a link to CesiumWidget.css stylesheet in HTML head,
|
|
44511
|
-
// and in the body, include: <div id="cesiumContainer"></div>
|
|
44512
|
-
|
|
44513
|
-
// Widget with no terrain and default Bing Maps imagery provider.
|
|
44514
|
-
const widget = new Cesium.CesiumWidget("cesiumContainer");
|
|
44515
|
-
|
|
44516
|
-
// Widget with ion imagery and Cesium World Terrain.
|
|
44517
|
-
const widget2 = new Cesium.CesiumWidget("cesiumContainer", {
|
|
44518
|
-
|
|
44519
|
-
|
|
44520
|
-
|
|
44521
|
-
|
|
44522
|
-
|
|
44523
|
-
|
|
44524
|
-
|
|
44525
|
-
|
|
44526
|
-
|
|
44527
|
-
|
|
44528
|
-
|
|
44529
|
-
|
|
44530
|
-
|
|
44531
|
-
|
|
44532
|
-
|
|
44533
|
-
});
|
|
44530
|
+
* // and in the body, include: <div id="cesiumContainer"></div>
|
|
44531
|
+
*
|
|
44532
|
+
* // Widget with no terrain and default Bing Maps imagery provider.
|
|
44533
|
+
* const widget = new Cesium.CesiumWidget("cesiumContainer");
|
|
44534
|
+
*
|
|
44535
|
+
* // Widget with ion imagery and Cesium World Terrain.
|
|
44536
|
+
* const widget2 = new Cesium.CesiumWidget("cesiumContainer", {
|
|
44537
|
+
* baseLayer: Cesium.ImageryLayer.fromWorldTerrain(),
|
|
44538
|
+
* terrain: Cesium.Terrain.fromWorldTerrain()
|
|
44539
|
+
* skyBox: new Cesium.SkyBox({
|
|
44540
|
+
* sources: {
|
|
44541
|
+
* positiveX: "stars/TychoSkymapII.t3_08192x04096_80_px.jpg",
|
|
44542
|
+
* negativeX: "stars/TychoSkymapII.t3_08192x04096_80_mx.jpg",
|
|
44543
|
+
* positiveY: "stars/TychoSkymapII.t3_08192x04096_80_py.jpg",
|
|
44544
|
+
* negativeY: "stars/TychoSkymapII.t3_08192x04096_80_my.jpg",
|
|
44545
|
+
* positiveZ: "stars/TychoSkymapII.t3_08192x04096_80_pz.jpg",
|
|
44546
|
+
* negativeZ: "stars/TychoSkymapII.t3_08192x04096_80_mz.jpg"
|
|
44547
|
+
* }
|
|
44548
|
+
* }),
|
|
44549
|
+
* // Show Columbus View map with Web Mercator projection
|
|
44550
|
+
* sceneMode: Cesium.SceneMode.COLUMBUS_VIEW,
|
|
44551
|
+
* mapProjection: new Cesium.WebMercatorProjection()
|
|
44552
|
+
* });
|
|
44534
44553
|
* @param container - The DOM element or ID that will contain the widget.
|
|
44535
44554
|
* @param [options] - Object with the following properties:
|
|
44536
44555
|
* @param [options.clock = new Clock()] - The clock to use to control current time.
|
|
@@ -44553,10 +44572,10 @@ const widget2 = new Cesium.CesiumWidget("cesiumContainer", {
|
|
|
44553
44572
|
* @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.
|
|
44554
44573
|
* @param [options.contextOptions] - Context and WebGL creation properties passed to {@link Scene}.
|
|
44555
44574
|
* @param [options.creditContainer] - The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added
|
|
44556
|
-
|
|
44575
|
+
* to the bottom of the widget itself.
|
|
44557
44576
|
* @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.
|
|
44558
44577
|
* @param [options.dataSources = new DataSourceCollection()] - The collection of data sources visualized by the widget. If this parameter is provided,
|
|
44559
|
-
|
|
44578
|
+
* the instance is assumed to be owned by the caller and will not be destroyed when the widget is destroyed.
|
|
44560
44579
|
* @param [options.shadows = false] - Determines if shadows are cast by light sources.
|
|
44561
44580
|
* @param [options.terrainShadows = ShadowMode.RECEIVE_ONLY] - Determines if the terrain casts or receives shadows from light sources.
|
|
44562
44581
|
* @param [options.mapMode2D = MapMode2D.INFINITE_SCROLL] - Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
|
|
@@ -44635,7 +44654,7 @@ export class CesiumWidget {
|
|
|
44635
44654
|
readonly dataSourceDisplay: DataSourceDisplay;
|
|
44636
44655
|
/**
|
|
44637
44656
|
* Gets the collection of entities not tied to a particular data source.
|
|
44638
|
-
|
|
44657
|
+
* This is a shortcut to [dataSourceDisplay.defaultDataSource.entities]{@link CesiumWidget#dataSourceDisplay}.
|
|
44639
44658
|
*/
|
|
44640
44659
|
readonly entities: EntityCollection;
|
|
44641
44660
|
/**
|
|
@@ -44660,46 +44679,46 @@ export class CesiumWidget {
|
|
|
44660
44679
|
readonly screenSpaceEventHandler: ScreenSpaceEventHandler;
|
|
44661
44680
|
/**
|
|
44662
44681
|
* Gets or sets the target frame rate of the widget when <code>useDefaultRenderLoop</code>
|
|
44663
|
-
|
|
44664
|
-
|
|
44665
|
-
|
|
44682
|
+
* is true. If undefined, the browser's requestAnimationFrame implementation
|
|
44683
|
+
* determines the frame rate. If defined, this value must be greater than 0. A value higher
|
|
44684
|
+
* than the underlying requestAnimationFrame implementation will have no effect.
|
|
44666
44685
|
*/
|
|
44667
44686
|
targetFrameRate: number;
|
|
44668
44687
|
/**
|
|
44669
44688
|
* Gets or sets whether or not this widget should control the render loop.
|
|
44670
|
-
|
|
44671
|
-
|
|
44672
|
-
|
|
44673
|
-
|
|
44674
|
-
|
|
44675
|
-
|
|
44676
|
-
|
|
44677
|
-
|
|
44689
|
+
* If true the widget will use requestAnimationFrame to
|
|
44690
|
+
* perform rendering and resizing of the widget, as well as drive the
|
|
44691
|
+
* simulation clock. If set to false, you must manually call the
|
|
44692
|
+
* <code>resize</code>, <code>render</code> methods as part of a custom
|
|
44693
|
+
* render loop. If an error occurs during rendering, {@link Scene}'s
|
|
44694
|
+
* <code>renderError</code> event will be raised and this property
|
|
44695
|
+
* will be set to false. It must be set back to true to continue rendering
|
|
44696
|
+
* after the error.
|
|
44678
44697
|
*/
|
|
44679
44698
|
useDefaultRenderLoop: boolean;
|
|
44680
44699
|
/**
|
|
44681
44700
|
* Gets or sets a scaling factor for rendering resolution. Values less than 1.0 can improve
|
|
44682
|
-
|
|
44683
|
-
|
|
44684
|
-
|
|
44685
|
-
|
|
44686
|
-
|
|
44701
|
+
* performance on less powerful devices while values greater than 1.0 will render at a higher
|
|
44702
|
+
* resolution and then scale down, resulting in improved visual fidelity.
|
|
44703
|
+
* For example, if the widget is laid out at a size of 640x480, setting this value to 0.5
|
|
44704
|
+
* will cause the scene to be rendered at 320x240 and then scaled up while setting
|
|
44705
|
+
* it to 2.0 will cause the scene to be rendered at 1280x960 and then scaled down.
|
|
44687
44706
|
*/
|
|
44688
44707
|
resolutionScale: number;
|
|
44689
44708
|
/**
|
|
44690
44709
|
* Boolean flag indicating if the browser's recommended resolution is used.
|
|
44691
|
-
|
|
44692
|
-
|
|
44693
|
-
|
|
44694
|
-
|
|
44695
|
-
|
|
44710
|
+
* If true, the browser's device pixel ratio is ignored and 1.0 is used instead,
|
|
44711
|
+
* effectively rendering based on CSS pixels instead of device pixels. This can improve
|
|
44712
|
+
* performance on less powerful devices that have high pixel density. When false, rendering
|
|
44713
|
+
* will be in device pixels. {@link CesiumWidget#resolutionScale} will still take effect whether
|
|
44714
|
+
* this flag is true or false.
|
|
44696
44715
|
*/
|
|
44697
44716
|
useBrowserRecommendedResolution: boolean;
|
|
44698
44717
|
/**
|
|
44699
44718
|
* Gets or sets whether or not data sources can temporarily pause
|
|
44700
|
-
|
|
44701
|
-
|
|
44702
|
-
|
|
44719
|
+
* animation in order to avoid showing an incomplete picture to the user.
|
|
44720
|
+
* For example, if asynchronous primitives are being processed in the
|
|
44721
|
+
* background, the clock will not advance until the geometry is ready.
|
|
44703
44722
|
*/
|
|
44704
44723
|
allowDataSourcesToSuspendAnimation: boolean;
|
|
44705
44724
|
/**
|
|
@@ -44716,9 +44735,9 @@ export class CesiumWidget {
|
|
|
44716
44735
|
clockTrackedDataSource: DataSource;
|
|
44717
44736
|
/**
|
|
44718
44737
|
* Show an error panel to the user containing a title and a longer error message,
|
|
44719
|
-
|
|
44720
|
-
|
|
44721
|
-
|
|
44738
|
+
* which can be dismissed using an OK button. This panel is displayed automatically
|
|
44739
|
+
* when a render loop error occurs, if showRenderLoopErrors was not false when the
|
|
44740
|
+
* widget was constructed.
|
|
44722
44741
|
* @param title - The title to be displayed on the error panel. This string is interpreted as text.
|
|
44723
44742
|
* @param [message] - A helpful, user-facing message to display prior to the detailed error information. This string is interpreted as HTML.
|
|
44724
44743
|
* @param [error] - The error to be displayed on the error panel. This string is formatted using {@link formatError} and then displayed as text.
|
|
@@ -44730,34 +44749,34 @@ export class CesiumWidget {
|
|
|
44730
44749
|
isDestroyed(): boolean;
|
|
44731
44750
|
/**
|
|
44732
44751
|
* Destroys the widget. Should be called if permanently
|
|
44733
|
-
|
|
44752
|
+
* removing the widget from layout.
|
|
44734
44753
|
*/
|
|
44735
44754
|
destroy(): void;
|
|
44736
44755
|
/**
|
|
44737
44756
|
* Updates the canvas size, camera aspect ratio, and viewport size.
|
|
44738
|
-
|
|
44739
|
-
|
|
44757
|
+
* This function is called automatically as needed unless
|
|
44758
|
+
* <code>useDefaultRenderLoop</code> is set to false.
|
|
44740
44759
|
*/
|
|
44741
44760
|
resize(): void;
|
|
44742
44761
|
/**
|
|
44743
44762
|
* Renders the scene. This function is called automatically
|
|
44744
|
-
|
|
44763
|
+
* unless <code>useDefaultRenderLoop</code> is set to false;
|
|
44745
44764
|
*/
|
|
44746
44765
|
render(): void;
|
|
44747
44766
|
/**
|
|
44748
44767
|
* Asynchronously sets the camera to view the provided entity, entities, or data source.
|
|
44749
|
-
|
|
44750
|
-
|
|
44751
|
-
|
|
44752
|
-
|
|
44753
|
-
|
|
44754
|
-
|
|
44755
|
-
|
|
44756
|
-
|
|
44757
|
-
|
|
44758
|
-
|
|
44759
|
-
|
|
44760
|
-
|
|
44768
|
+
* If the data source is still in the process of loading or the visualization is otherwise still loading,
|
|
44769
|
+
* this method waits for the data to be ready before performing the zoom.
|
|
44770
|
+
*
|
|
44771
|
+
* <p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
44772
|
+
* The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
44773
|
+
* The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
44774
|
+
* angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is
|
|
44775
|
+
* zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
44776
|
+
*
|
|
44777
|
+
* <p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
44778
|
+
* target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
44779
|
+
* determined from the offset, the heading will be north.</p>
|
|
44761
44780
|
* @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.
|
|
44762
44781
|
* @param [offset] - The offset from the center of the entity in the local east-north-up reference frame.
|
|
44763
44782
|
* @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.
|
|
@@ -44765,18 +44784,18 @@ export class CesiumWidget {
|
|
|
44765
44784
|
zoomTo(target: Entity | Entity[] | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | Promise<Entity | Entity[] | EntityCollection | DataSource | ImageryLayer | Cesium3DTileset | TimeDynamicPointCloud | VoxelPrimitive>, offset?: HeadingPitchRange): Promise<boolean>;
|
|
44766
44785
|
/**
|
|
44767
44786
|
* Flies the camera to the provided entity, entities, or data source.
|
|
44768
|
-
|
|
44769
|
-
|
|
44770
|
-
|
|
44771
|
-
|
|
44772
|
-
|
|
44773
|
-
|
|
44774
|
-
|
|
44775
|
-
|
|
44776
|
-
|
|
44777
|
-
|
|
44778
|
-
|
|
44779
|
-
|
|
44787
|
+
* If the data source is still in the process of loading or the visualization is otherwise still loading,
|
|
44788
|
+
* this method waits for the data to be ready before performing the flight.
|
|
44789
|
+
*
|
|
44790
|
+
* <p>The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere.
|
|
44791
|
+
* The heading and the pitch angles are defined in the local east-north-up reference frame.
|
|
44792
|
+
* The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch
|
|
44793
|
+
* angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is
|
|
44794
|
+
* zero, a range will be computed such that the whole bounding sphere is visible.</p>
|
|
44795
|
+
*
|
|
44796
|
+
* <p>In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the
|
|
44797
|
+
* target will be the range. The heading will be determined from the offset. If the heading cannot be
|
|
44798
|
+
* determined from the offset, the heading will be north.</p>
|
|
44780
44799
|
* @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
44800
|
* @param [options] - Object with the following properties:
|
|
44782
44801
|
* @param [options.duration = 3.0] - The duration of the flight in seconds.
|
|
@@ -45093,12 +45112,12 @@ export class BaseLayerPickerViewModel {
|
|
|
45093
45112
|
});
|
|
45094
45113
|
/**
|
|
45095
45114
|
* Gets or sets an array of ProviderViewModel instances available for imagery selection.
|
|
45096
|
-
|
|
45115
|
+
* This property is observable.
|
|
45097
45116
|
*/
|
|
45098
45117
|
imageryProviderViewModels: ProviderViewModel[];
|
|
45099
45118
|
/**
|
|
45100
45119
|
* Gets or sets an array of ProviderViewModel instances available for terrain selection.
|
|
45101
|
-
|
|
45120
|
+
* This property is observable.
|
|
45102
45121
|
*/
|
|
45103
45122
|
terrainProviderViewModels: ProviderViewModel[];
|
|
45104
45123
|
/**
|
|
@@ -45139,7 +45158,7 @@ export class BaseLayerPickerViewModel {
|
|
|
45139
45158
|
* @param options.iconUrl - An icon representing the layer.
|
|
45140
45159
|
* @param [options.category] - A category for the layer.
|
|
45141
45160
|
* @param options.creationFunction - A function or Command
|
|
45142
|
-
|
|
45161
|
+
* that creates one or more providers which will be added to the globe when this item is selected.
|
|
45143
45162
|
*/
|
|
45144
45163
|
export class ProviderViewModel {
|
|
45145
45164
|
constructor(options: {
|
|
@@ -45163,7 +45182,7 @@ export class ProviderViewModel {
|
|
|
45163
45182
|
iconUrl: string;
|
|
45164
45183
|
/**
|
|
45165
45184
|
* Gets the Command that creates one or more providers which will be added to
|
|
45166
|
-
|
|
45185
|
+
* the globe when this item is selected.
|
|
45167
45186
|
*/
|
|
45168
45187
|
readonly creationCommand: Command;
|
|
45169
45188
|
/**
|