mars3d-cesium 1.126.2 → 1.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Cesium/Cesium.d.ts +649 -571
- package/Build/Cesium/Cesium.js +5817 -5789
- package/Build/Cesium/ThirdParty/Workers/pako_inflate.min.js +1 -1
- package/Build/Cesium/Workers/{chunk-RLNLNL6Y.js → chunk-24ZYVES6.js} +2 -2
- package/Build/Cesium/Workers/{chunk-VPLHXR2B.js → chunk-3ENQPBUN.js} +2 -2
- package/Build/Cesium/Workers/{chunk-ACQ7P2GP.js → chunk-3YPXVLQ6.js} +2 -2
- package/Build/Cesium/Workers/{chunk-GEGB3K2H.js → chunk-57PW5AGA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-JPDPEPPK.js → chunk-5J5JFWFF.js} +2 -2
- package/Build/Cesium/Workers/{chunk-BNNASHS5.js → chunk-7JZ622KV.js} +2 -2
- package/Build/Cesium/Workers/{chunk-6VAOYJ4Q.js → chunk-AB4TV57V.js} +2 -2
- package/Build/Cesium/Workers/{chunk-7T7XMB3Y.js → chunk-AL2R7GJ7.js} +2 -2
- package/Build/Cesium/Workers/{chunk-4NTIZU6S.js → chunk-BHYPSTQQ.js} +1 -1
- package/Build/Cesium/Workers/{chunk-CJHX6SWR.js → chunk-CE6GQKJJ.js} +2 -2
- package/Build/Cesium/Workers/{chunk-3X7V2EO2.js → chunk-D54BCNKE.js} +2 -2
- package/Build/Cesium/Workers/{chunk-XRDG5LN7.js → chunk-DQ5B4ZQ2.js} +2 -2
- package/Build/Cesium/Workers/{chunk-6GA4Q2DK.js → chunk-E4LXASBA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-YB2RTWOV.js → chunk-GQCGSB5G.js} +2 -2
- package/Build/Cesium/Workers/{chunk-TGLCLO5X.js → chunk-GXQVTO24.js} +2 -2
- package/Build/Cesium/Workers/{chunk-CWP2SDHN.js → chunk-H5M663KA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-RTA74CJX.js → chunk-HJ5UQDTV.js} +2 -2
- package/Build/Cesium/Workers/{chunk-D5LB274J.js → chunk-HQB4CVCR.js} +2 -2
- package/Build/Cesium/Workers/{chunk-KOK32Q4J.js → chunk-IEMGHOZF.js} +1 -1
- package/Build/Cesium/Workers/{chunk-3BJ2FCCQ.js → chunk-INVMDTVE.js} +2 -2
- package/Build/Cesium/Workers/{chunk-BEEWJIFH.js → chunk-ISJZ32RD.js} +1 -1
- package/Build/Cesium/Workers/{chunk-P5AD4E2S.js → chunk-IZDTPXD6.js} +2 -2
- package/Build/Cesium/Workers/{chunk-N3QEH6BC.js → chunk-JGR3PAEH.js} +2 -2
- package/Build/Cesium/Workers/{chunk-D3P7QTFD.js → chunk-JIHKLWIP.js} +2 -2
- package/Build/Cesium/Workers/{chunk-JTVNGPPR.js → chunk-KGWIGYGA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-VEIGU5F3.js → chunk-NTNB2RUS.js} +2 -2
- package/Build/Cesium/Workers/{chunk-RUVZSJPP.js → chunk-NXCJXR6T.js} +2 -2
- package/Build/Cesium/Workers/{chunk-SCYG2423.js → chunk-O5ZGMTCB.js} +2 -2
- package/Build/Cesium/Workers/{chunk-2ABBI2JG.js → chunk-OJFQMRFX.js} +2 -2
- package/Build/Cesium/Workers/{chunk-ANR4IFD4.js → chunk-Q6GL2VVS.js} +2 -2
- package/Build/Cesium/Workers/{chunk-TYCSUVZ4.js → chunk-QNKLIOX7.js} +2 -2
- package/Build/Cesium/Workers/{chunk-2XH33C4K.js → chunk-QT4PP33T.js} +2 -2
- package/Build/Cesium/Workers/{chunk-KOZHD7LM.js → chunk-QWFB7ESA.js} +2 -2
- package/Build/Cesium/Workers/{chunk-NUWAUNN2.js → chunk-SCRFYNVO.js} +1 -1
- package/Build/Cesium/Workers/{chunk-YX3IB3TK.js → chunk-SZ5OG7RY.js} +2 -2
- package/Build/Cesium/Workers/chunk-TTY3TN4U.js +26 -0
- package/Build/Cesium/Workers/{chunk-AB73NGS3.js → chunk-U4PXMDKD.js} +2 -2
- package/Build/Cesium/Workers/{chunk-H32B77KM.js → chunk-UMETRE6B.js} +2 -2
- package/Build/Cesium/Workers/{chunk-VJ3OOPD5.js → chunk-USIHDKAN.js} +2 -2
- package/Build/Cesium/Workers/{chunk-JS26HL3Y.js → chunk-V6IKLZ6C.js} +2 -2
- package/Build/Cesium/Workers/{chunk-NPKJLKTD.js → chunk-WFRUBKWC.js} +1 -1
- package/Build/Cesium/Workers/{chunk-463F4QGB.js → chunk-WVO4EJQU.js} +2 -2
- package/Build/Cesium/Workers/{chunk-4RE5TK7J.js → chunk-X5W7MYUD.js} +2 -2
- package/Build/Cesium/Workers/{chunk-B4Q6LYZ2.js → chunk-XDNP4UT3.js} +2 -2
- package/Build/Cesium/Workers/{chunk-HJH5EDUI.js → chunk-XFEQWSLI.js} +2 -2
- package/Build/Cesium/Workers/{chunk-C2P645MX.js → chunk-XK36GTOK.js} +2 -2
- package/Build/Cesium/Workers/{chunk-XQZVE3TB.js → chunk-XOOKTTHX.js} +2 -2
- package/Build/Cesium/Workers/{chunk-7JXUEP4W.js → chunk-Y6VI4U57.js} +2 -2
- package/Build/Cesium/Workers/{chunk-BJSU2TZZ.js → chunk-Z527LWHO.js} +2 -2
- package/Build/Cesium/Workers/{chunk-LSHHQNGK.js → chunk-ZO6A2GWK.js} +2 -2
- package/Build/Cesium/Workers/{chunk-DJD6JBSI.js → chunk-ZPZQMRC3.js} +2 -2
- package/Build/Cesium/Workers/{chunk-EHAIRWUB.js → chunk-ZSRNYCAQ.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 +2 -2
- package/Build/Cesium/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/Build/Cesium/index.cjs +5801 -5773
- package/Build/Cesium/index.js +5792 -5764
- package/package.json +1 -1
- package/Build/Cesium/Workers/chunk-6LYTDESA.js +0 -26
package/Build/Cesium/Cesium.d.ts
CHANGED
|
@@ -8976,10 +8976,10 @@ export class Interval {
|
|
|
8976
8976
|
|
|
8977
8977
|
/**
|
|
8978
8978
|
* Default settings for accessing the Cesium ion API.
|
|
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}
|
|
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
|
/**
|
|
@@ -19026,7 +19026,7 @@ export class BillboardVisualizer {
|
|
|
19026
19026
|
constructor(entityCluster: EntityCluster, entityCollection: EntityCollection);
|
|
19027
19027
|
/**
|
|
19028
19028
|
* Updates the primitives created by this visualizer to match their
|
|
19029
|
-
|
|
19029
|
+
* Entity counterpart at the given time.
|
|
19030
19030
|
* @param time - The time to update to.
|
|
19031
19031
|
* @returns This function always returns true.
|
|
19032
19032
|
*/
|
|
@@ -21330,11 +21330,11 @@ export class EntityCluster {
|
|
|
21330
21330
|
clusterPoints: boolean;
|
|
21331
21331
|
/**
|
|
21332
21332
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21333
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
21334
|
+
* <p>
|
|
21335
|
+
* Unlike other objects that use WebGL resources, this object can be reused. For example, if a data source is removed
|
|
21336
|
+
* from a data source collection and added to another.
|
|
21337
|
+
* </p>
|
|
21338
21338
|
*/
|
|
21339
21339
|
destroy(): void;
|
|
21340
21340
|
}
|
|
@@ -21344,13 +21344,13 @@ export namespace EntityCluster {
|
|
|
21344
21344
|
* A event listener function used to style clusters.
|
|
21345
21345
|
* @example
|
|
21346
21346
|
* // The default cluster values.
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21347
|
+
* dataSource.clustering.clusterEvent.addEventListener(function(entities, cluster) {
|
|
21348
|
+
* cluster.label.show = true;
|
|
21349
|
+
* cluster.label.text = entities.length.toLocaleString();
|
|
21350
|
+
* });
|
|
21351
21351
|
* @param clusteredEntities - An array of the entities contained in the cluster.
|
|
21352
21352
|
* @param cluster - An object containing the Billboard, Label, and Point
|
|
21353
|
-
|
|
21353
|
+
* primitives that represent this cluster of entities.
|
|
21354
21354
|
*/
|
|
21355
21355
|
type newClusterCallback = (clusteredEntities: Entity[], cluster: {
|
|
21356
21356
|
billboard: Billboard;
|
|
@@ -25560,12 +25560,12 @@ export class WallGraphics {
|
|
|
25560
25560
|
|
|
25561
25561
|
/**
|
|
25562
25562
|
* Options to control the setting up of a WebGL Context.
|
|
25563
|
-
<p>
|
|
25564
|
-
<code>allowTextureFilterAnisotropic</code> defaults to true, which enables
|
|
25565
|
-
anisotropic texture filtering when the WebGL extension is supported.
|
|
25566
|
-
Setting this to false will improve performance, but hurt visual quality,
|
|
25567
|
-
especially for horizon views.
|
|
25568
|
-
</p>
|
|
25563
|
+
* <p>
|
|
25564
|
+
* <code>allowTextureFilterAnisotropic</code> defaults to true, which enables
|
|
25565
|
+
* anisotropic texture filtering when the WebGL extension is supported.
|
|
25566
|
+
* Setting this to false will improve performance, but hurt visual quality,
|
|
25567
|
+
* especially for horizon views.
|
|
25568
|
+
* </p>
|
|
25569
25569
|
* @property [requestWebgl1 = false] - If true and the browser supports it, use a WebGL 1 rendering context
|
|
25570
25570
|
* @property [allowTextureFilterAnisotropic = true] - If true, use anisotropic filtering during texture sampling
|
|
25571
25571
|
* @property [webgl] - WebGL options to be passed on to canvas.getContext
|
|
@@ -25580,15 +25580,15 @@ export type ContextOptions = {
|
|
|
25580
25580
|
|
|
25581
25581
|
/**
|
|
25582
25582
|
* WebGL options to be passed on to HTMLCanvasElement.getContext().
|
|
25583
|
-
See {@link https://registry.khronos.org/webgl/specs/latest/1.0/#5.2|WebGLContextAttributes}
|
|
25584
|
-
but note the modified defaults for 'alpha', 'stencil', and 'powerPreference'
|
|
25585
|
-
|
|
25586
|
-
<p>
|
|
25587
|
-
<code>alpha</code> defaults to false, which can improve performance
|
|
25588
|
-
compared to the standard WebGL default of true. If an application needs
|
|
25589
|
-
to composite Cesium above other HTML elements using alpha-blending, set
|
|
25590
|
-
<code>alpha</code> to true.
|
|
25591
|
-
</p>
|
|
25583
|
+
* See {@link https://registry.khronos.org/webgl/specs/latest/1.0/#5.2|WebGLContextAttributes}
|
|
25584
|
+
* but note the modified defaults for 'alpha', 'stencil', and 'powerPreference'
|
|
25585
|
+
*
|
|
25586
|
+
* <p>
|
|
25587
|
+
* <code>alpha</code> defaults to false, which can improve performance
|
|
25588
|
+
* compared to the standard WebGL default of true. If an application needs
|
|
25589
|
+
* to composite Cesium above other HTML elements using alpha-blending, set
|
|
25590
|
+
* <code>alpha</code> to true.
|
|
25591
|
+
* </p>
|
|
25592
25592
|
*/
|
|
25593
25593
|
export type WebGLOptions = {
|
|
25594
25594
|
alpha?: boolean;
|
|
@@ -25990,11 +25990,11 @@ export class ArcGisMapServerImageryProvider {
|
|
|
25990
25990
|
|
|
25991
25991
|
/**
|
|
25992
25992
|
* Default options for accessing the ArcGIS image tile service.
|
|
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}.
|
|
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
|
/**
|
|
@@ -26176,16 +26176,16 @@ export namespace Billboard {
|
|
|
26176
26176
|
|
|
26177
26177
|
/**
|
|
26178
26178
|
* <div class="notice">
|
|
26179
|
-
A billboard is created and its initial
|
|
26180
|
-
properties are set by calling {@link BillboardCollection#add}. Do not call the constructor directly.
|
|
26181
|
-
</div>
|
|
26182
|
-
A viewport-aligned image positioned in the 3D scene, that is created
|
|
26183
|
-
and rendered using a {@link BillboardCollection}.
|
|
26184
|
-
<br /><br />
|
|
26185
|
-
<div align='center'>
|
|
26186
|
-
<img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
26187
|
-
Example billboards
|
|
26188
|
-
</div>
|
|
26179
|
+
* A billboard is created and its initial
|
|
26180
|
+
* properties are set by calling {@link BillboardCollection#add}. Do not call the constructor directly.
|
|
26181
|
+
* </div>
|
|
26182
|
+
* A viewport-aligned image positioned in the 3D scene, that is created
|
|
26183
|
+
* and rendered using a {@link BillboardCollection}.
|
|
26184
|
+
* <br /><br />
|
|
26185
|
+
* <div align='center'>
|
|
26186
|
+
* <img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
26187
|
+
* Example billboards
|
|
26188
|
+
* </div>
|
|
26189
26189
|
* @param options - Object describing initialization options
|
|
26190
26190
|
* @param billboardCollection - Instance of BillboardCollection
|
|
26191
26191
|
*/
|
|
@@ -26193,7 +26193,7 @@ export class Billboard {
|
|
|
26193
26193
|
constructor(options: Billboard.ConstructorOptions, billboardCollection: BillboardCollection);
|
|
26194
26194
|
/**
|
|
26195
26195
|
* Determines if this billboard will be shown. Use this to hide or show a billboard, instead
|
|
26196
|
-
|
|
26196
|
+
* of removing it and re-adding it to the collection.
|
|
26197
26197
|
*/
|
|
26198
26198
|
show: boolean;
|
|
26199
26199
|
/**
|
|
@@ -26206,159 +26206,159 @@ export class Billboard {
|
|
|
26206
26206
|
heightReference: HeightReference;
|
|
26207
26207
|
/**
|
|
26208
26208
|
* Gets or sets the pixel offset in screen space from the origin of this billboard. This is commonly used
|
|
26209
|
-
|
|
26210
|
-
|
|
26211
|
-
|
|
26212
|
-
|
|
26213
|
-
|
|
26214
|
-
|
|
26215
|
-
|
|
26216
|
-
|
|
26217
|
-
|
|
26218
|
-
|
|
26219
|
-
|
|
26209
|
+
* to align multiple billboards and labels at the same position, e.g., an image and text. The
|
|
26210
|
+
* screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
26211
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
26212
|
+
* <br /><br />
|
|
26213
|
+
* <div align='center'>
|
|
26214
|
+
* <table border='0' cellpadding='5'><tr>
|
|
26215
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setPixelOffset.default.png' width='250' height='188' /></td>
|
|
26216
|
+
* <td align='center'><code>b.pixeloffset = new Cartesian2(50, 25);</code><br/><img src='Images/Billboard.setPixelOffset.x50y-25.png' width='250' height='188' /></td>
|
|
26217
|
+
* </tr></table>
|
|
26218
|
+
* The billboard's origin is indicated by the yellow point.
|
|
26219
|
+
* </div>
|
|
26220
26220
|
*/
|
|
26221
26221
|
pixelOffset: Cartesian2;
|
|
26222
26222
|
/**
|
|
26223
26223
|
* Gets or sets near and far scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
26224
|
-
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26224
|
+
* A billboard's scale will interpolate between the {@link NearFarScalar#nearValue} and
|
|
26225
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
26226
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
26227
|
+
* Outside of these ranges the billboard's scale remains clamped to the nearest bound. If undefined,
|
|
26228
|
+
* scaleByDistance will be disabled.
|
|
26229
26229
|
* @example
|
|
26230
26230
|
* // Example 1.
|
|
26231
|
-
|
|
26232
|
-
|
|
26233
|
-
|
|
26234
|
-
|
|
26231
|
+
* // Set a billboard's scaleByDistance to scale by 1.5 when the
|
|
26232
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
26233
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
26234
|
+
* b.scaleByDistance = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
|
|
26235
26235
|
* @example
|
|
26236
26236
|
* // Example 2.
|
|
26237
|
-
|
|
26238
|
-
|
|
26237
|
+
* // disable scaling by distance
|
|
26238
|
+
* b.scaleByDistance = undefined;
|
|
26239
26239
|
*/
|
|
26240
26240
|
scaleByDistance: NearFarScalar;
|
|
26241
26241
|
/**
|
|
26242
26242
|
* Gets or sets near and far translucency properties of a Billboard based on the billboard's distance from the camera.
|
|
26243
|
-
|
|
26244
|
-
|
|
26245
|
-
|
|
26246
|
-
|
|
26247
|
-
|
|
26243
|
+
* A billboard's translucency will interpolate between the {@link NearFarScalar#nearValue} and
|
|
26244
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
26245
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
26246
|
+
* Outside of these ranges the billboard's translucency remains clamped to the nearest bound. If undefined,
|
|
26247
|
+
* translucencyByDistance will be disabled.
|
|
26248
26248
|
* @example
|
|
26249
26249
|
* // Example 1.
|
|
26250
|
-
|
|
26251
|
-
|
|
26252
|
-
|
|
26253
|
-
|
|
26250
|
+
* // Set a billboard's translucency to 1.0 when the
|
|
26251
|
+
* // camera is 1500 meters from the billboard and disappear as
|
|
26252
|
+
* // the camera distance approaches 8.0e6 meters.
|
|
26253
|
+
* b.translucencyByDistance = new Cesium.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
|
|
26254
26254
|
* @example
|
|
26255
26255
|
* // Example 2.
|
|
26256
|
-
|
|
26257
|
-
|
|
26256
|
+
* // disable translucency by distance
|
|
26257
|
+
* b.translucencyByDistance = undefined;
|
|
26258
26258
|
*/
|
|
26259
26259
|
translucencyByDistance: NearFarScalar;
|
|
26260
26260
|
/**
|
|
26261
26261
|
* Gets or sets near and far pixel offset scaling properties of a Billboard based on the billboard's distance from the camera.
|
|
26262
|
-
|
|
26263
|
-
|
|
26264
|
-
|
|
26265
|
-
|
|
26266
|
-
|
|
26262
|
+
* A billboard's pixel offset will be scaled between the {@link NearFarScalar#nearValue} and
|
|
26263
|
+
* {@link NearFarScalar#farValue} while the camera distance falls within the lower and upper bounds
|
|
26264
|
+
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
|
|
26265
|
+
* Outside of these ranges the billboard's pixel offset scale remains clamped to the nearest bound. If undefined,
|
|
26266
|
+
* pixelOffsetScaleByDistance will be disabled.
|
|
26267
26267
|
* @example
|
|
26268
26268
|
* // Example 1.
|
|
26269
|
-
|
|
26270
|
-
|
|
26271
|
-
|
|
26272
|
-
|
|
26273
|
-
|
|
26269
|
+
* // Set a billboard's pixel offset scale to 0.0 when the
|
|
26270
|
+
* // camera is 1500 meters from the billboard and scale pixel offset to 10.0 pixels
|
|
26271
|
+
* // in the y direction the camera distance approaches 8.0e6 meters.
|
|
26272
|
+
* b.pixelOffset = new Cesium.Cartesian2(0.0, 1.0);
|
|
26273
|
+
* b.pixelOffsetScaleByDistance = new Cesium.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
|
|
26274
26274
|
* @example
|
|
26275
26275
|
* // Example 2.
|
|
26276
|
-
|
|
26277
|
-
|
|
26276
|
+
* // disable pixel offset by distance
|
|
26277
|
+
* b.pixelOffsetScaleByDistance = undefined;
|
|
26278
26278
|
*/
|
|
26279
26279
|
pixelOffsetScaleByDistance: NearFarScalar;
|
|
26280
26280
|
/**
|
|
26281
26281
|
* Gets or sets the 3D Cartesian offset applied to this billboard in eye coordinates. Eye coordinates is a left-handed
|
|
26282
|
-
|
|
26283
|
-
|
|
26284
|
-
|
|
26285
|
-
|
|
26286
|
-
|
|
26287
|
-
|
|
26288
|
-
|
|
26289
|
-
|
|
26290
|
-
|
|
26291
|
-
|
|
26292
|
-
|
|
26293
|
-
|
|
26294
|
-
|
|
26295
|
-
|
|
26296
|
-
|
|
26297
|
-
|
|
26298
|
-
|
|
26282
|
+
* coordinate system, where <code>x</code> points towards the viewer's right, <code>y</code> points up, and
|
|
26283
|
+
* <code>z</code> points into the screen. Eye coordinates use the same scale as world and model coordinates,
|
|
26284
|
+
* which is typically meters.
|
|
26285
|
+
* <br /><br />
|
|
26286
|
+
* An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to
|
|
26287
|
+
* arrange a billboard above its corresponding 3D model.
|
|
26288
|
+
* <br /><br />
|
|
26289
|
+
* Below, the billboard is positioned at the center of the Earth but an eye offset makes it always
|
|
26290
|
+
* appear on top of the Earth regardless of the viewer's or Earth's orientation.
|
|
26291
|
+
* <br /><br />
|
|
26292
|
+
* <div align='center'>
|
|
26293
|
+
* <table border='0' cellpadding='5'><tr>
|
|
26294
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.one.png' width='250' height='188' /></td>
|
|
26295
|
+
* <td align='center'><img src='Images/Billboard.setEyeOffset.two.png' width='250' height='188' /></td>
|
|
26296
|
+
* </tr></table>
|
|
26297
|
+
* <code>b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);</code><br /><br />
|
|
26298
|
+
* </div>
|
|
26299
26299
|
*/
|
|
26300
26300
|
eyeOffset: Cartesian3;
|
|
26301
26301
|
/**
|
|
26302
26302
|
* Gets or sets the horizontal origin of this billboard, which determines if the billboard is
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
|
|
26306
|
-
|
|
26307
|
-
|
|
26303
|
+
* to the left, center, or right of its anchor position.
|
|
26304
|
+
* <br /><br />
|
|
26305
|
+
* <div align='center'>
|
|
26306
|
+
* <img src='Images/Billboard.setHorizontalOrigin.png' width='648' height='196' /><br />
|
|
26307
|
+
* </div>
|
|
26308
26308
|
* @example
|
|
26309
26309
|
* // Use a bottom, left origin
|
|
26310
|
-
|
|
26311
|
-
|
|
26310
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
26311
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
26312
26312
|
*/
|
|
26313
26313
|
horizontalOrigin: HorizontalOrigin;
|
|
26314
26314
|
/**
|
|
26315
26315
|
* Gets or sets the vertical origin of this billboard, which determines if the billboard is
|
|
26316
|
-
|
|
26317
|
-
|
|
26318
|
-
|
|
26319
|
-
|
|
26320
|
-
|
|
26316
|
+
* to the above, below, or at the center of its anchor position.
|
|
26317
|
+
* <br /><br />
|
|
26318
|
+
* <div align='center'>
|
|
26319
|
+
* <img src='Images/Billboard.setVerticalOrigin.png' width='695' height='175' /><br />
|
|
26320
|
+
* </div>
|
|
26321
26321
|
* @example
|
|
26322
26322
|
* // Use a bottom, left origin
|
|
26323
|
-
|
|
26324
|
-
|
|
26323
|
+
* b.horizontalOrigin = Cesium.HorizontalOrigin.LEFT;
|
|
26324
|
+
* b.verticalOrigin = Cesium.VerticalOrigin.BOTTOM;
|
|
26325
26325
|
*/
|
|
26326
26326
|
verticalOrigin: VerticalOrigin;
|
|
26327
26327
|
/**
|
|
26328
26328
|
* Gets or sets the uniform scale that is multiplied with the billboard's image size in pixels.
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
|
|
26334
|
-
|
|
26335
|
-
|
|
26336
|
-
|
|
26337
|
-
|
|
26329
|
+
* A scale of <code>1.0</code> does not change the size of the billboard; a scale greater than
|
|
26330
|
+
* <code>1.0</code> enlarges the billboard; a positive scale less than <code>1.0</code> shrinks
|
|
26331
|
+
* the billboard.
|
|
26332
|
+
* <br /><br />
|
|
26333
|
+
* <div align='center'>
|
|
26334
|
+
* <img src='Images/Billboard.setScale.png' width='400' height='300' /><br/>
|
|
26335
|
+
* From left to right in the above image, the scales are <code>0.5</code>, <code>1.0</code>,
|
|
26336
|
+
* and <code>2.0</code>.
|
|
26337
|
+
* </div>
|
|
26338
26338
|
*/
|
|
26339
26339
|
scale: number;
|
|
26340
26340
|
/**
|
|
26341
26341
|
* Gets or sets the color that is multiplied with the billboard's texture. This has two common use cases. First,
|
|
26342
|
-
|
|
26343
|
-
|
|
26344
|
-
|
|
26345
|
-
|
|
26346
|
-
|
|
26347
|
-
|
|
26348
|
-
|
|
26349
|
-
|
|
26350
|
-
|
|
26351
|
-
|
|
26352
|
-
|
|
26353
|
-
|
|
26354
|
-
|
|
26355
|
-
|
|
26342
|
+
* the same white texture may be used by many different billboards, each with a different color, to create
|
|
26343
|
+
* colored billboards. Second, the color's alpha component can be used to make the billboard translucent as shown below.
|
|
26344
|
+
* An alpha of <code>0.0</code> makes the billboard transparent, and <code>1.0</code> makes the billboard opaque.
|
|
26345
|
+
* <br /><br />
|
|
26346
|
+
* <div align='center'>
|
|
26347
|
+
* <table border='0' cellpadding='5'><tr>
|
|
26348
|
+
* <td align='center'><code>default</code><br/><img src='Images/Billboard.setColor.Alpha255.png' width='250' height='188' /></td>
|
|
26349
|
+
* <td align='center'><code>alpha : 0.5</code><br/><img src='Images/Billboard.setColor.Alpha127.png' width='250' height='188' /></td>
|
|
26350
|
+
* </tr></table>
|
|
26351
|
+
* </div>
|
|
26352
|
+
* <br />
|
|
26353
|
+
* The red, green, blue, and alpha values are indicated by <code>value</code>'s <code>red</code>, <code>green</code>,
|
|
26354
|
+
* <code>blue</code>, and <code>alpha</code> properties as shown in Example 1. These components range from <code>0.0</code>
|
|
26355
|
+
* (no intensity) to <code>1.0</code> (full intensity).
|
|
26356
26356
|
* @example
|
|
26357
26357
|
* // Example 1. Assign yellow.
|
|
26358
|
-
|
|
26358
|
+
* b.color = Cesium.Color.YELLOW;
|
|
26359
26359
|
* @example
|
|
26360
26360
|
* // Example 2. Make a billboard 50% translucent.
|
|
26361
|
-
|
|
26361
|
+
* b.color = new Cesium.Color(1.0, 1.0, 1.0, 0.5);
|
|
26362
26362
|
*/
|
|
26363
26363
|
color: Color;
|
|
26364
26364
|
/**
|
|
@@ -26367,33 +26367,33 @@ export class Billboard {
|
|
|
26367
26367
|
rotation: number;
|
|
26368
26368
|
/**
|
|
26369
26369
|
* Gets or sets the aligned axis in world space. The aligned axis is the unit vector that the billboard up vector points towards.
|
|
26370
|
-
|
|
26370
|
+
* The default is the zero vector, which means the billboard is aligned to the screen up vector.
|
|
26371
26371
|
* @example
|
|
26372
26372
|
* // Example 1.
|
|
26373
|
-
|
|
26374
|
-
|
|
26373
|
+
* // Have the billboard up vector point north
|
|
26374
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
26375
26375
|
* @example
|
|
26376
26376
|
* // Example 2.
|
|
26377
|
-
|
|
26378
|
-
|
|
26379
|
-
|
|
26377
|
+
* // Have the billboard point east.
|
|
26378
|
+
* billboard.alignedAxis = Cesium.Cartesian3.UNIT_Z;
|
|
26379
|
+
* billboard.rotation = -Cesium.Math.PI_OVER_TWO;
|
|
26380
26380
|
* @example
|
|
26381
26381
|
* // Example 3.
|
|
26382
|
-
|
|
26383
|
-
|
|
26382
|
+
* // Reset the aligned axis
|
|
26383
|
+
* billboard.alignedAxis = Cesium.Cartesian3.ZERO;
|
|
26384
26384
|
*/
|
|
26385
26385
|
alignedAxis: Cartesian3;
|
|
26386
26386
|
/**
|
|
26387
26387
|
* Gets or sets a width for the billboard. If undefined, the image width will be used.
|
|
26388
26388
|
*/
|
|
26389
|
-
width: number;
|
|
26389
|
+
width: number | undefined;
|
|
26390
26390
|
/**
|
|
26391
26391
|
* Gets or sets a height for the billboard. If undefined, the image height will be used.
|
|
26392
26392
|
*/
|
|
26393
|
-
height: number;
|
|
26393
|
+
height: number | undefined;
|
|
26394
26394
|
/**
|
|
26395
26395
|
* Gets or sets if the billboard size is in meters or pixels. <code>true</code> to size the billboard in meters;
|
|
26396
|
-
|
|
26396
|
+
* otherwise, the size is in pixels.
|
|
26397
26397
|
*/
|
|
26398
26398
|
sizeInMeters: boolean;
|
|
26399
26399
|
/**
|
|
@@ -26402,7 +26402,7 @@ export class Billboard {
|
|
|
26402
26402
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
26403
26403
|
/**
|
|
26404
26404
|
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
26405
|
-
|
|
26405
|
+
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
|
|
26406
26406
|
*/
|
|
26407
26407
|
disableDepthTestDistance: number;
|
|
26408
26408
|
/**
|
|
@@ -26411,25 +26411,25 @@ export class Billboard {
|
|
|
26411
26411
|
id: any;
|
|
26412
26412
|
/**
|
|
26413
26413
|
* <p>
|
|
26414
|
-
|
|
26415
|
-
|
|
26416
|
-
|
|
26417
|
-
|
|
26418
|
-
|
|
26419
|
-
|
|
26420
|
-
|
|
26414
|
+
* Gets or sets the image to be used for this billboard. If a texture has already been created for the
|
|
26415
|
+
* given image, the existing texture is used.
|
|
26416
|
+
* </p>
|
|
26417
|
+
* <p>
|
|
26418
|
+
* This property can be set to a loaded Image, a URL which will be loaded as an Image automatically,
|
|
26419
|
+
* a canvas, or another billboard's image property (from the same billboard collection).
|
|
26420
|
+
* </p>
|
|
26421
26421
|
* @example
|
|
26422
26422
|
* // load an image from a URL
|
|
26423
|
-
|
|
26424
|
-
|
|
26425
|
-
|
|
26426
|
-
|
|
26427
|
-
|
|
26423
|
+
* b.image = 'some/image/url.png';
|
|
26424
|
+
*
|
|
26425
|
+
* // assuming b1 and b2 are billboards in the same billboard collection,
|
|
26426
|
+
* // use the same image for both billboards.
|
|
26427
|
+
* b2.image = b1.image;
|
|
26428
26428
|
*/
|
|
26429
26429
|
image: string;
|
|
26430
26430
|
/**
|
|
26431
26431
|
* When <code>true</code>, this billboard is ready to render, i.e., the image
|
|
26432
|
-
|
|
26432
|
+
* has been downloaded and the WebGL resources are created.
|
|
26433
26433
|
*/
|
|
26434
26434
|
readonly ready: boolean;
|
|
26435
26435
|
/**
|
|
@@ -26438,49 +26438,49 @@ export class Billboard {
|
|
|
26438
26438
|
splitDirection: SplitDirection;
|
|
26439
26439
|
/**
|
|
26440
26440
|
* <p>
|
|
26441
|
-
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26445
|
-
|
|
26446
|
-
|
|
26447
|
-
|
|
26448
|
-
|
|
26449
|
-
|
|
26450
|
-
|
|
26451
|
-
|
|
26441
|
+
* Sets the image to be used for this billboard. If a texture has already been created for the
|
|
26442
|
+
* given id, the existing texture is used.
|
|
26443
|
+
* </p>
|
|
26444
|
+
* <p>
|
|
26445
|
+
* This function is useful for dynamically creating textures that are shared across many billboards.
|
|
26446
|
+
* Only the first billboard will actually call the function and create the texture, while subsequent
|
|
26447
|
+
* billboards created with the same id will simply re-use the existing texture.
|
|
26448
|
+
* </p>
|
|
26449
|
+
* <p>
|
|
26450
|
+
* To load an image from a URL, setting the {@link Billboard#image} property is more convenient.
|
|
26451
|
+
* </p>
|
|
26452
26452
|
* @example
|
|
26453
26453
|
* // create a billboard image dynamically
|
|
26454
|
-
|
|
26455
|
-
|
|
26456
|
-
|
|
26457
|
-
|
|
26458
|
-
|
|
26459
|
-
|
|
26460
|
-
|
|
26461
|
-
|
|
26462
|
-
|
|
26463
|
-
|
|
26464
|
-
|
|
26465
|
-
|
|
26466
|
-
|
|
26454
|
+
* function drawImage(id) {
|
|
26455
|
+
* // create and draw an image using a canvas
|
|
26456
|
+
* const canvas = document.createElement('canvas');
|
|
26457
|
+
* const context2D = canvas.getContext('2d');
|
|
26458
|
+
* // ... draw image
|
|
26459
|
+
* return canvas;
|
|
26460
|
+
* }
|
|
26461
|
+
* // drawImage will be called to create the texture
|
|
26462
|
+
* b.setImage('myImage', drawImage);
|
|
26463
|
+
*
|
|
26464
|
+
* // subsequent billboards created in the same collection using the same id will use the existing
|
|
26465
|
+
* // texture, without the need to create the canvas or draw the image
|
|
26466
|
+
* b2.setImage('myImage', drawImage);
|
|
26467
26467
|
* @param id - The id of the image. This can be any string that uniquely identifies the image.
|
|
26468
26468
|
* @param image - The image to load. This parameter
|
|
26469
|
-
|
|
26470
|
-
|
|
26469
|
+
* can either be a loaded Image or Canvas, a URL which will be loaded as an Image automatically,
|
|
26470
|
+
* or a function which will be called to create the image if it hasn't been loaded already.
|
|
26471
26471
|
*/
|
|
26472
26472
|
setImage(id: string, image: HTMLImageElement | HTMLCanvasElement | string | Resource | Billboard.CreateImageCallback): void;
|
|
26473
26473
|
/**
|
|
26474
26474
|
* Uses a sub-region of the image with the given id as the image for this billboard,
|
|
26475
|
-
|
|
26475
|
+
* measured in pixels from the bottom-left.
|
|
26476
26476
|
* @param id - The id of the image to use.
|
|
26477
26477
|
* @param subRegion - The sub-region of the image.
|
|
26478
26478
|
*/
|
|
26479
26479
|
setImageSubRegion(id: string, subRegion: BoundingRectangle): void;
|
|
26480
26480
|
/**
|
|
26481
26481
|
* Computes the screen-space position of the billboard's origin, taking into account eye and pixel offsets.
|
|
26482
|
-
|
|
26483
|
-
|
|
26482
|
+
* The screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|
|
26483
|
+
* left to right, and <code>y</code> increases from top to bottom.
|
|
26484
26484
|
* @example
|
|
26485
26485
|
* console.log(b.computeScreenSpacePosition(scene).toString());
|
|
26486
26486
|
* @param scene - The scene.
|
|
@@ -26490,7 +26490,7 @@ export class Billboard {
|
|
|
26490
26490
|
computeScreenSpacePosition(scene: Scene, result?: Cartesian2): Cartesian2;
|
|
26491
26491
|
/**
|
|
26492
26492
|
* Determines if this billboard equals another billboard. Billboards are equal if all their properties
|
|
26493
|
-
|
|
26493
|
+
* are equal. Billboards in different collections can be equal.
|
|
26494
26494
|
* @param [other] - The billboard to compare for equality.
|
|
26495
26495
|
* @returns <code>true</code> if the billboards are equal; otherwise, <code>false</code>.
|
|
26496
26496
|
*/
|
|
@@ -26499,34 +26499,34 @@ export class Billboard {
|
|
|
26499
26499
|
|
|
26500
26500
|
/**
|
|
26501
26501
|
* A renderable collection of billboards. Billboards are viewport-aligned
|
|
26502
|
-
images positioned in the 3D scene.
|
|
26503
|
-
<br /><br />
|
|
26504
|
-
<div align='center'>
|
|
26505
|
-
<img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
26506
|
-
Example billboards
|
|
26507
|
-
</div>
|
|
26508
|
-
<br /><br />
|
|
26509
|
-
Billboards are added and removed from the collection using {@link BillboardCollection#add}
|
|
26510
|
-
and {@link BillboardCollection#remove}. Billboards in a collection automatically share textures
|
|
26511
|
-
for images with the same identifier.
|
|
26502
|
+
* images positioned in the 3D scene.
|
|
26503
|
+
* <br /><br />
|
|
26504
|
+
* <div align='center'>
|
|
26505
|
+
* <img src='Images/Billboard.png' width='400' height='300' /><br />
|
|
26506
|
+
* Example billboards
|
|
26507
|
+
* </div>
|
|
26508
|
+
* <br /><br />
|
|
26509
|
+
* Billboards are added and removed from the collection using {@link BillboardCollection#add}
|
|
26510
|
+
* and {@link BillboardCollection#remove}. Billboards in a collection automatically share textures
|
|
26511
|
+
* for images with the same identifier.
|
|
26512
26512
|
* @example
|
|
26513
26513
|
* // Create a billboard collection with two billboards
|
|
26514
|
-
const billboards = scene.primitives.add(new Cesium.BillboardCollection());
|
|
26515
|
-
billboards.add({
|
|
26516
|
-
|
|
26517
|
-
|
|
26518
|
-
});
|
|
26519
|
-
billboards.add({
|
|
26520
|
-
|
|
26521
|
-
|
|
26522
|
-
});
|
|
26514
|
+
* const billboards = scene.primitives.add(new Cesium.BillboardCollection());
|
|
26515
|
+
* billboards.add({
|
|
26516
|
+
* position : new Cesium.Cartesian3(1.0, 2.0, 3.0),
|
|
26517
|
+
* image : 'url/to/image'
|
|
26518
|
+
* });
|
|
26519
|
+
* billboards.add({
|
|
26520
|
+
* position : new Cesium.Cartesian3(4.0, 5.0, 6.0),
|
|
26521
|
+
* image : 'url/to/another/image'
|
|
26522
|
+
* });
|
|
26523
26523
|
* @param [options] - Object with the following properties:
|
|
26524
26524
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms each billboard from model to world coordinates.
|
|
26525
26525
|
* @param [options.debugShowBoundingVolume = false] - For debugging only. Determines if this primitive's commands' bounding spheres are shown.
|
|
26526
26526
|
* @param [options.scene] - Must be passed in for billboards that use the height reference property or will be depth tested against the globe.
|
|
26527
26527
|
* @param [options.blendOption = BlendOption.OPAQUE_AND_TRANSLUCENT] - The billboard blending option. The default
|
|
26528
|
-
is used for rendering both opaque and translucent billboards. However, if either all of the billboards are completely opaque or all are completely translucent,
|
|
26529
|
-
setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
26528
|
+
* is used for rendering both opaque and translucent billboards. However, if either all of the billboards are completely opaque or all are completely translucent,
|
|
26529
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
26530
26530
|
* @param [options.show = true] - Determines if the billboards in the collection will be shown.
|
|
26531
26531
|
*/
|
|
26532
26532
|
export class BillboardCollection {
|
|
@@ -26543,90 +26543,90 @@ export class BillboardCollection {
|
|
|
26543
26543
|
show: boolean;
|
|
26544
26544
|
/**
|
|
26545
26545
|
* The 4x4 transformation matrix that transforms each billboard in this collection from model to world coordinates.
|
|
26546
|
-
|
|
26547
|
-
|
|
26548
|
-
|
|
26546
|
+
* When this is the identity matrix, the billboards are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
26547
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
26548
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
26549
26549
|
* @example
|
|
26550
26550
|
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
|
|
26551
|
-
|
|
26552
|
-
|
|
26553
|
-
|
|
26554
|
-
|
|
26555
|
-
|
|
26556
|
-
|
|
26557
|
-
|
|
26558
|
-
|
|
26559
|
-
|
|
26560
|
-
|
|
26561
|
-
|
|
26562
|
-
|
|
26563
|
-
|
|
26564
|
-
|
|
26565
|
-
|
|
26566
|
-
|
|
26567
|
-
|
|
26551
|
+
* billboards.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
|
|
26552
|
+
* billboards.add({
|
|
26553
|
+
* image : 'url/to/image',
|
|
26554
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 0.0) // center
|
|
26555
|
+
* });
|
|
26556
|
+
* billboards.add({
|
|
26557
|
+
* image : 'url/to/image',
|
|
26558
|
+
* position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0) // east
|
|
26559
|
+
* });
|
|
26560
|
+
* billboards.add({
|
|
26561
|
+
* image : 'url/to/image',
|
|
26562
|
+
* position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0) // north
|
|
26563
|
+
* });
|
|
26564
|
+
* billboards.add({
|
|
26565
|
+
* image : 'url/to/image',
|
|
26566
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0) // up
|
|
26567
|
+
* });
|
|
26568
26568
|
*/
|
|
26569
26569
|
modelMatrix: Matrix4;
|
|
26570
26570
|
/**
|
|
26571
26571
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
26572
|
-
|
|
26573
|
-
|
|
26574
|
-
|
|
26572
|
+
* <p>
|
|
26573
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
26574
|
+
* </p>
|
|
26575
26575
|
*/
|
|
26576
26576
|
debugShowBoundingVolume: boolean;
|
|
26577
26577
|
/**
|
|
26578
26578
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
26579
|
-
|
|
26580
|
-
|
|
26581
|
-
|
|
26579
|
+
* <p>
|
|
26580
|
+
* Draws the texture atlas for this BillboardCollection as a fullscreen quad.
|
|
26581
|
+
* </p>
|
|
26582
26582
|
*/
|
|
26583
26583
|
debugShowTextureAtlas: boolean;
|
|
26584
26584
|
/**
|
|
26585
26585
|
* The billboard blending option. The default is used for rendering both opaque and translucent billboards.
|
|
26586
|
-
|
|
26587
|
-
|
|
26588
|
-
|
|
26586
|
+
* However, if either all of the billboards are completely opaque or all are completely translucent,
|
|
26587
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve
|
|
26588
|
+
* performance by up to 2x.
|
|
26589
26589
|
*/
|
|
26590
26590
|
blendOption: BlendOption;
|
|
26591
26591
|
/**
|
|
26592
26592
|
* Returns the number of billboards in this collection. This is commonly used with
|
|
26593
|
-
|
|
26594
|
-
|
|
26593
|
+
* {@link BillboardCollection#get} to iterate over all the billboards
|
|
26594
|
+
* in the collection.
|
|
26595
26595
|
*/
|
|
26596
|
-
length: number;
|
|
26596
|
+
readonly length: number;
|
|
26597
26597
|
/**
|
|
26598
26598
|
* Creates and adds a billboard with the specified initial properties to the collection.
|
|
26599
|
-
|
|
26599
|
+
* The added billboard is returned so it can be modified or removed from the collection later.
|
|
26600
26600
|
* @example
|
|
26601
26601
|
* // Example 1: Add a billboard, specifying all the default values.
|
|
26602
|
-
|
|
26603
|
-
|
|
26604
|
-
|
|
26605
|
-
|
|
26606
|
-
|
|
26607
|
-
|
|
26608
|
-
|
|
26609
|
-
|
|
26610
|
-
|
|
26611
|
-
|
|
26612
|
-
|
|
26613
|
-
|
|
26614
|
-
|
|
26615
|
-
|
|
26616
|
-
|
|
26617
|
-
|
|
26618
|
-
|
|
26619
|
-
|
|
26620
|
-
|
|
26621
|
-
|
|
26622
|
-
|
|
26623
|
-
|
|
26624
|
-
|
|
26602
|
+
* const b = billboards.add({
|
|
26603
|
+
* show : true,
|
|
26604
|
+
* position : Cesium.Cartesian3.ZERO,
|
|
26605
|
+
* pixelOffset : Cesium.Cartesian2.ZERO,
|
|
26606
|
+
* eyeOffset : Cesium.Cartesian3.ZERO,
|
|
26607
|
+
* heightReference : Cesium.HeightReference.NONE,
|
|
26608
|
+
* horizontalOrigin : Cesium.HorizontalOrigin.CENTER,
|
|
26609
|
+
* verticalOrigin : Cesium.VerticalOrigin.CENTER,
|
|
26610
|
+
* scale : 1.0,
|
|
26611
|
+
* image : 'url/to/image',
|
|
26612
|
+
* imageSubRegion : undefined,
|
|
26613
|
+
* color : Cesium.Color.WHITE,
|
|
26614
|
+
* id : undefined,
|
|
26615
|
+
* rotation : 0.0,
|
|
26616
|
+
* alignedAxis : Cesium.Cartesian3.ZERO,
|
|
26617
|
+
* width : undefined,
|
|
26618
|
+
* height : undefined,
|
|
26619
|
+
* scaleByDistance : undefined,
|
|
26620
|
+
* translucencyByDistance : undefined,
|
|
26621
|
+
* pixelOffsetScaleByDistance : undefined,
|
|
26622
|
+
* sizeInMeters : false,
|
|
26623
|
+
* distanceDisplayCondition : undefined
|
|
26624
|
+
* });
|
|
26625
26625
|
* @example
|
|
26626
26626
|
* // Example 2: Specify only the billboard's cartographic position.
|
|
26627
|
-
|
|
26628
|
-
|
|
26629
|
-
|
|
26627
|
+
* const b = billboards.add({
|
|
26628
|
+
* position : Cesium.Cartesian3.fromDegrees(longitude, latitude, height)
|
|
26629
|
+
* });
|
|
26630
26630
|
* @param [options] - A template describing the billboard's properties as shown in Example 1.
|
|
26631
26631
|
* @returns The billboard that was added to the collection.
|
|
26632
26632
|
*/
|
|
@@ -26635,7 +26635,7 @@ export class BillboardCollection {
|
|
|
26635
26635
|
* Removes a billboard from the collection.
|
|
26636
26636
|
* @example
|
|
26637
26637
|
* const b = billboards.add(...);
|
|
26638
|
-
|
|
26638
|
+
* billboards.remove(b); // Returns true
|
|
26639
26639
|
* @param billboard - The billboard to remove.
|
|
26640
26640
|
* @returns <code>true</code> if the billboard was removed; <code>false</code> if the billboard was not found in the collection.
|
|
26641
26641
|
*/
|
|
@@ -26644,8 +26644,8 @@ export class BillboardCollection {
|
|
|
26644
26644
|
* Removes all billboards from the collection.
|
|
26645
26645
|
* @example
|
|
26646
26646
|
* billboards.add(...);
|
|
26647
|
-
|
|
26648
|
-
|
|
26647
|
+
* billboards.add(...);
|
|
26648
|
+
* billboards.removeAll();
|
|
26649
26649
|
*/
|
|
26650
26650
|
removeAll(): void;
|
|
26651
26651
|
/**
|
|
@@ -26656,45 +26656,45 @@ export class BillboardCollection {
|
|
|
26656
26656
|
contains(billboard?: Billboard): boolean;
|
|
26657
26657
|
/**
|
|
26658
26658
|
* Returns the billboard in the collection at the specified index. Indices are zero-based
|
|
26659
|
-
|
|
26660
|
-
|
|
26661
|
-
|
|
26662
|
-
|
|
26659
|
+
* and increase as billboards are added. Removing a billboard shifts all billboards after
|
|
26660
|
+
* it to the left, changing their indices. This function is commonly used with
|
|
26661
|
+
* {@link BillboardCollection#length} to iterate over all the billboards
|
|
26662
|
+
* in the collection.
|
|
26663
26663
|
* @example
|
|
26664
26664
|
* // Toggle the show property of every billboard in the collection
|
|
26665
|
-
|
|
26666
|
-
|
|
26667
|
-
|
|
26668
|
-
|
|
26669
|
-
|
|
26665
|
+
* const len = billboards.length;
|
|
26666
|
+
* for (let i = 0; i < len; ++i) {
|
|
26667
|
+
* const b = billboards.get(i);
|
|
26668
|
+
* b.show = !b.show;
|
|
26669
|
+
* }
|
|
26670
26670
|
* @param index - The zero-based index of the billboard.
|
|
26671
26671
|
* @returns The billboard at the specified index.
|
|
26672
26672
|
*/
|
|
26673
26673
|
get(index: number): Billboard;
|
|
26674
26674
|
/**
|
|
26675
26675
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
26676
|
-
|
|
26677
|
-
|
|
26678
|
-
|
|
26679
|
-
|
|
26680
|
-
|
|
26676
|
+
* get the draw commands needed to render this primitive.
|
|
26677
|
+
* <p>
|
|
26678
|
+
* Do not call this function directly. This is documented just to
|
|
26679
|
+
* list the exceptions that may be propagated when the scene is rendered:
|
|
26680
|
+
* </p>
|
|
26681
26681
|
*/
|
|
26682
26682
|
update(): void;
|
|
26683
26683
|
/**
|
|
26684
26684
|
* Returns true if this object was destroyed; otherwise, false.
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
|
|
26685
|
+
* <br /><br />
|
|
26686
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
26687
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
26688
26688
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
26689
26689
|
*/
|
|
26690
26690
|
isDestroyed(): boolean;
|
|
26691
26691
|
/**
|
|
26692
26692
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
26693
|
-
|
|
26694
|
-
|
|
26695
|
-
|
|
26696
|
-
|
|
26697
|
-
|
|
26693
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
26694
|
+
* <br /><br />
|
|
26695
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
26696
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
26697
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
26698
26698
|
* @example
|
|
26699
26699
|
* billboards = billboards && billboards.destroy();
|
|
26700
26700
|
*/
|
|
@@ -30114,110 +30114,162 @@ export class Cesium3DTileStyle {
|
|
|
30114
30114
|
meta: StyleExpression;
|
|
30115
30115
|
}
|
|
30116
30116
|
|
|
30117
|
+
export namespace Cesium3DTilesVoxelProvider {
|
|
30118
|
+
/**
|
|
30119
|
+
* Initialization options for the Cesium3DTilesVoxelProvider constructor
|
|
30120
|
+
* @property className - The class in the tileset schema describing voxel metadata.
|
|
30121
|
+
* @property names - The metadata names.
|
|
30122
|
+
* @property types - The metadata types.
|
|
30123
|
+
* @property componentTypes - The metadata component types.
|
|
30124
|
+
* @property shape - The {@link VoxelShapeType}.
|
|
30125
|
+
* @property dimensions - The number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
30126
|
+
* @property [paddingBefore = Cartesian3.ZERO] - The number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30127
|
+
* @property [paddingAfter = Cartesian3.ZERO] - The number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30128
|
+
* @property [globalTransform = Matrix4.IDENTITY] - A transform from local space to global space.
|
|
30129
|
+
* @property [shapeTransform = Matrix4.IDENTITY] - A transform from shape space to local space.
|
|
30130
|
+
* @property [minBounds] - The minimum bounds.
|
|
30131
|
+
* @property [maxBounds] - The maximum bounds.
|
|
30132
|
+
* @property [minimumValues] - The metadata minimum values.
|
|
30133
|
+
* @property [maximumValues] - The metadata maximum values.
|
|
30134
|
+
* @property [maximumTileCount] - The maximum number of tiles that exist for this provider. This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory. If this value is not known it can be undefined.
|
|
30135
|
+
*/
|
|
30136
|
+
type ConstructorOptions = {
|
|
30137
|
+
className: string;
|
|
30138
|
+
names: string[];
|
|
30139
|
+
types: MetadataType[];
|
|
30140
|
+
componentTypes: MetadataComponentType[];
|
|
30141
|
+
shape: VoxelShapeType;
|
|
30142
|
+
dimensions: Cartesian3;
|
|
30143
|
+
paddingBefore?: Cartesian3;
|
|
30144
|
+
paddingAfter?: Cartesian3;
|
|
30145
|
+
globalTransform?: Matrix4;
|
|
30146
|
+
shapeTransform?: Matrix4;
|
|
30147
|
+
minBounds?: Cartesian3;
|
|
30148
|
+
maxBounds?: Cartesian3;
|
|
30149
|
+
minimumValues?: number[][];
|
|
30150
|
+
maximumValues?: number[][];
|
|
30151
|
+
maximumTileCount?: number;
|
|
30152
|
+
};
|
|
30153
|
+
}
|
|
30154
|
+
|
|
30117
30155
|
/**
|
|
30118
30156
|
* A {@link VoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
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
|
-
* @param options -
|
|
30157
|
+
* <p>
|
|
30158
|
+
* Implements the {@link VoxelProvider} interface.
|
|
30159
|
+
* </p>
|
|
30160
|
+
* <div class="notice">
|
|
30161
|
+
* This object is normally not instantiated directly, use {@link Cesium3DTilesVoxelProvider.fromUrl}.
|
|
30162
|
+
* </div>
|
|
30163
|
+
* @param options - An object describing initialization options
|
|
30126
30164
|
*/
|
|
30127
30165
|
export class Cesium3DTilesVoxelProvider extends VoxelProvider {
|
|
30128
|
-
constructor(options:
|
|
30166
|
+
constructor(options: Cesium3DTilesVoxelProvider.ConstructorOptions);
|
|
30129
30167
|
/**
|
|
30130
|
-
*
|
|
30131
|
-
* @param url - The URL to a tileset JSON file
|
|
30132
|
-
* @returns The created provider
|
|
30133
|
-
*/
|
|
30134
|
-
static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
|
|
30135
|
-
/**
|
|
30136
|
-
* A transform from local space to global space. If undefined, the identity matrix will be used instead.
|
|
30168
|
+
* A transform from local space to global space.
|
|
30137
30169
|
*/
|
|
30138
|
-
readonly globalTransform: Matrix4
|
|
30170
|
+
readonly globalTransform: Matrix4;
|
|
30139
30171
|
/**
|
|
30140
|
-
* A transform from shape space to local space.
|
|
30172
|
+
* A transform from shape space to local space.
|
|
30141
30173
|
*/
|
|
30142
|
-
readonly shapeTransform: Matrix4
|
|
30174
|
+
readonly shapeTransform: Matrix4;
|
|
30143
30175
|
/**
|
|
30144
30176
|
* Gets the {@link VoxelShapeType}
|
|
30145
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30146
30177
|
*/
|
|
30147
30178
|
readonly shape: VoxelShapeType;
|
|
30148
30179
|
/**
|
|
30149
30180
|
* Gets the minimum bounds.
|
|
30150
|
-
|
|
30151
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30181
|
+
* If undefined, the shape's default minimum bounds will be used instead.
|
|
30152
30182
|
*/
|
|
30153
30183
|
readonly minBounds: Cartesian3 | undefined;
|
|
30154
30184
|
/**
|
|
30155
30185
|
* Gets the maximum bounds.
|
|
30156
|
-
|
|
30157
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30186
|
+
* If undefined, the shape's default maximum bounds will be used instead.
|
|
30158
30187
|
*/
|
|
30159
30188
|
readonly maxBounds: Cartesian3 | undefined;
|
|
30160
30189
|
/**
|
|
30161
30190
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
30162
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30163
30191
|
*/
|
|
30164
30192
|
readonly dimensions: Cartesian3;
|
|
30165
30193
|
/**
|
|
30166
30194
|
* Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30167
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30168
30195
|
*/
|
|
30169
|
-
readonly paddingBefore: Cartesian3
|
|
30196
|
+
readonly paddingBefore: Cartesian3;
|
|
30170
30197
|
/**
|
|
30171
30198
|
* Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
30172
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30173
30199
|
*/
|
|
30174
|
-
readonly paddingAfter: Cartesian3
|
|
30200
|
+
readonly paddingAfter: Cartesian3;
|
|
30201
|
+
/**
|
|
30202
|
+
* The metadata class for this tileset.
|
|
30203
|
+
*/
|
|
30204
|
+
readonly className: string;
|
|
30175
30205
|
/**
|
|
30176
30206
|
* Gets the metadata names.
|
|
30177
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30178
30207
|
*/
|
|
30179
30208
|
readonly names: string[];
|
|
30180
30209
|
/**
|
|
30181
30210
|
* Gets the metadata types.
|
|
30182
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30183
30211
|
*/
|
|
30184
30212
|
readonly types: MetadataType[];
|
|
30185
30213
|
/**
|
|
30186
30214
|
* Gets the metadata component types.
|
|
30187
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30188
30215
|
*/
|
|
30189
30216
|
readonly componentTypes: MetadataComponentType[];
|
|
30217
|
+
/**
|
|
30218
|
+
* Gets the ordering of the metadata in the buffers.
|
|
30219
|
+
*/
|
|
30220
|
+
readonly metadataOrder: VoxelMetadataOrder;
|
|
30190
30221
|
/**
|
|
30191
30222
|
* Gets the metadata minimum values.
|
|
30192
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30193
30223
|
*/
|
|
30194
30224
|
readonly minimumValues: number[][] | undefined;
|
|
30195
30225
|
/**
|
|
30196
30226
|
* Gets the metadata maximum values.
|
|
30197
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
30198
30227
|
*/
|
|
30199
30228
|
readonly maximumValues: number[][] | undefined;
|
|
30200
30229
|
/**
|
|
30201
|
-
* The maximum number of tiles that exist for this provider.
|
|
30202
|
-
|
|
30230
|
+
* The maximum number of tiles that exist for this provider.
|
|
30231
|
+
* This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
|
|
30232
|
+
* If this value is not known it can be undefined.
|
|
30203
30233
|
*/
|
|
30204
30234
|
readonly maximumTileCount: number | undefined;
|
|
30205
30235
|
/**
|
|
30206
|
-
*
|
|
30207
|
-
|
|
30236
|
+
* The number of levels of detail containing available tiles in the tileset.
|
|
30237
|
+
*/
|
|
30238
|
+
readonly availableLevels: number | undefined;
|
|
30239
|
+
/**
|
|
30240
|
+
* Creates a {@link Cesium3DTilesVoxelProvider} that fetches voxel data from a 3D Tiles tileset.
|
|
30241
|
+
* @example
|
|
30242
|
+
* try {
|
|
30243
|
+
* const voxelProvider = await Cesium3DTilesVoxelProvider.fromUrl(
|
|
30244
|
+
* "http://localhost:8002/tilesets/voxel/tileset.json"
|
|
30245
|
+
* );
|
|
30246
|
+
* const voxelPrimitive = new VoxelPrimitive({
|
|
30247
|
+
* provider: voxelProvider,
|
|
30248
|
+
* customShader: customShader,
|
|
30249
|
+
* });
|
|
30250
|
+
* scene.primitives.add(voxelPrimitive);
|
|
30251
|
+
* } catch (error) {
|
|
30252
|
+
* console.error(`Error creating voxel primitive: ${error}`);
|
|
30253
|
+
* }
|
|
30254
|
+
* @param url - The URL to a tileset JSON file
|
|
30255
|
+
* @returns The created provider
|
|
30256
|
+
*/
|
|
30257
|
+
static fromUrl(url: Resource | string): Promise<Cesium3DTilesVoxelProvider>;
|
|
30258
|
+
/**
|
|
30259
|
+
* Requests the data for a given tile.
|
|
30208
30260
|
* @param [options] - Object with the following properties:
|
|
30209
30261
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
30210
30262
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
30211
30263
|
* @param [options.tileY = 0] - The tile's Y coordinate.
|
|
30212
30264
|
* @param [options.tileZ = 0] - The tile's Z coordinate.
|
|
30213
|
-
* @returns A promise to
|
|
30265
|
+
* @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
|
|
30214
30266
|
*/
|
|
30215
30267
|
requestData(options?: {
|
|
30216
30268
|
tileLevel?: number;
|
|
30217
30269
|
tileX?: number;
|
|
30218
30270
|
tileY?: number;
|
|
30219
30271
|
tileZ?: number;
|
|
30220
|
-
}): Promise<
|
|
30272
|
+
}): Promise<VoxelContent> | undefined;
|
|
30221
30273
|
}
|
|
30222
30274
|
|
|
30223
30275
|
/**
|
|
@@ -35485,33 +35537,33 @@ export class Label {
|
|
|
35485
35537
|
|
|
35486
35538
|
/**
|
|
35487
35539
|
* A renderable collection of labels. Labels are viewport-aligned text positioned in the 3D scene.
|
|
35488
|
-
Each label can have a different font, color, scale, etc.
|
|
35489
|
-
<br /><br />
|
|
35490
|
-
<div align='center'>
|
|
35491
|
-
<img src='Images/Label.png' width='400' height='300' /><br />
|
|
35492
|
-
Example labels
|
|
35493
|
-
</div>
|
|
35494
|
-
<br /><br />
|
|
35495
|
-
Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
35496
|
-
and {@link LabelCollection#remove}.
|
|
35540
|
+
* Each label can have a different font, color, scale, etc.
|
|
35541
|
+
* <br /><br />
|
|
35542
|
+
* <div align='center'>
|
|
35543
|
+
* <img src='Images/Label.png' width='400' height='300' /><br />
|
|
35544
|
+
* Example labels
|
|
35545
|
+
* </div>
|
|
35546
|
+
* <br /><br />
|
|
35547
|
+
* Labels are added and removed from the collection using {@link LabelCollection#add}
|
|
35548
|
+
* and {@link LabelCollection#remove}.
|
|
35497
35549
|
* @example
|
|
35498
35550
|
* // Create a label collection with two labels
|
|
35499
|
-
const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
35500
|
-
labels.add({
|
|
35501
|
-
|
|
35502
|
-
|
|
35503
|
-
});
|
|
35504
|
-
labels.add({
|
|
35505
|
-
|
|
35506
|
-
|
|
35507
|
-
});
|
|
35551
|
+
* const labels = scene.primitives.add(new Cesium.LabelCollection());
|
|
35552
|
+
* labels.add({
|
|
35553
|
+
* position : new Cesium.Cartesian3(1.0, 2.0, 3.0),
|
|
35554
|
+
* text : 'A label'
|
|
35555
|
+
* });
|
|
35556
|
+
* labels.add({
|
|
35557
|
+
* position : new Cesium.Cartesian3(4.0, 5.0, 6.0),
|
|
35558
|
+
* text : 'Another label'
|
|
35559
|
+
* });
|
|
35508
35560
|
* @param [options] - Object with the following properties:
|
|
35509
35561
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The 4x4 transformation matrix that transforms each label from model to world coordinates.
|
|
35510
35562
|
* @param [options.debugShowBoundingVolume = false] - For debugging only. Determines if this primitive's commands' bounding spheres are shown.
|
|
35511
35563
|
* @param [options.scene] - Must be passed in for labels that use the height reference property or will be depth tested against the globe.
|
|
35512
35564
|
* @param [options.blendOption = BlendOption.OPAQUE_AND_TRANSLUCENT] - The label blending option. The default
|
|
35513
|
-
is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
35514
|
-
setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
35565
|
+
* is used for rendering both opaque and translucent labels. However, if either all of the labels are completely opaque or all are completely translucent,
|
|
35566
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve performance by up to 2x.
|
|
35515
35567
|
* @param [options.show = true] - Determines if the labels in the collection will be shown.
|
|
35516
35568
|
*/
|
|
35517
35569
|
export class LabelCollection {
|
|
@@ -35528,85 +35580,85 @@ export class LabelCollection {
|
|
|
35528
35580
|
show: boolean;
|
|
35529
35581
|
/**
|
|
35530
35582
|
* The 4x4 transformation matrix that transforms each label in this collection from model to world coordinates.
|
|
35531
|
-
|
|
35532
|
-
|
|
35533
|
-
|
|
35583
|
+
* When this is the identity matrix, the labels are drawn in world coordinates, i.e., Earth's WGS84 coordinates.
|
|
35584
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
35585
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
35534
35586
|
* @example
|
|
35535
35587
|
* const center = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
|
|
35536
|
-
|
|
35537
|
-
|
|
35538
|
-
|
|
35539
|
-
|
|
35540
|
-
|
|
35541
|
-
|
|
35542
|
-
|
|
35543
|
-
|
|
35544
|
-
|
|
35545
|
-
|
|
35546
|
-
|
|
35547
|
-
|
|
35548
|
-
|
|
35549
|
-
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
|
|
35588
|
+
* labels.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);
|
|
35589
|
+
* labels.add({
|
|
35590
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 0.0),
|
|
35591
|
+
* text : 'Center'
|
|
35592
|
+
* });
|
|
35593
|
+
* labels.add({
|
|
35594
|
+
* position : new Cesium.Cartesian3(1000000.0, 0.0, 0.0),
|
|
35595
|
+
* text : 'East'
|
|
35596
|
+
* });
|
|
35597
|
+
* labels.add({
|
|
35598
|
+
* position : new Cesium.Cartesian3(0.0, 1000000.0, 0.0),
|
|
35599
|
+
* text : 'North'
|
|
35600
|
+
* });
|
|
35601
|
+
* labels.add({
|
|
35602
|
+
* position : new Cesium.Cartesian3(0.0, 0.0, 1000000.0),
|
|
35603
|
+
* text : 'Up'
|
|
35604
|
+
* });
|
|
35553
35605
|
*/
|
|
35554
35606
|
modelMatrix: Matrix4;
|
|
35555
35607
|
/**
|
|
35556
35608
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
35557
|
-
|
|
35558
|
-
|
|
35559
|
-
|
|
35609
|
+
* <p>
|
|
35610
|
+
* Draws the bounding sphere for each draw command in the primitive.
|
|
35611
|
+
* </p>
|
|
35560
35612
|
*/
|
|
35561
35613
|
debugShowBoundingVolume: boolean;
|
|
35562
35614
|
/**
|
|
35563
35615
|
* The label blending option. The default is used for rendering both opaque and translucent labels.
|
|
35564
|
-
|
|
35565
|
-
|
|
35566
|
-
|
|
35616
|
+
* However, if either all of the labels are completely opaque or all are completely translucent,
|
|
35617
|
+
* setting the technique to BlendOption.OPAQUE or BlendOption.TRANSLUCENT can improve
|
|
35618
|
+
* performance by up to 2x.
|
|
35567
35619
|
*/
|
|
35568
35620
|
blendOption: BlendOption;
|
|
35569
35621
|
/**
|
|
35570
35622
|
* Returns the number of labels in this collection. This is commonly used with
|
|
35571
|
-
|
|
35572
|
-
|
|
35623
|
+
* {@link LabelCollection#get} to iterate over all the labels
|
|
35624
|
+
* in the collection.
|
|
35573
35625
|
*/
|
|
35574
|
-
length: number;
|
|
35626
|
+
readonly length: number;
|
|
35575
35627
|
/**
|
|
35576
35628
|
* Creates and adds a label with the specified initial properties to the collection.
|
|
35577
|
-
|
|
35629
|
+
* The added label is returned so it can be modified or removed from the collection later.
|
|
35578
35630
|
* @example
|
|
35579
35631
|
* // Example 1: Add a label, specifying all the default values.
|
|
35580
|
-
|
|
35581
|
-
|
|
35582
|
-
|
|
35583
|
-
|
|
35584
|
-
|
|
35585
|
-
|
|
35586
|
-
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
|
|
35590
|
-
|
|
35591
|
-
|
|
35592
|
-
|
|
35593
|
-
|
|
35594
|
-
|
|
35595
|
-
|
|
35596
|
-
|
|
35597
|
-
|
|
35598
|
-
|
|
35599
|
-
|
|
35600
|
-
|
|
35601
|
-
|
|
35632
|
+
* const l = labels.add({
|
|
35633
|
+
* show : true,
|
|
35634
|
+
* position : Cesium.Cartesian3.ZERO,
|
|
35635
|
+
* text : '',
|
|
35636
|
+
* font : '30px sans-serif',
|
|
35637
|
+
* fillColor : Cesium.Color.WHITE,
|
|
35638
|
+
* outlineColor : Cesium.Color.BLACK,
|
|
35639
|
+
* outlineWidth : 1.0,
|
|
35640
|
+
* showBackground : false,
|
|
35641
|
+
* backgroundColor : new Cesium.Color(0.165, 0.165, 0.165, 0.8),
|
|
35642
|
+
* backgroundPadding : new Cesium.Cartesian2(7, 5),
|
|
35643
|
+
* style : Cesium.LabelStyle.FILL,
|
|
35644
|
+
* pixelOffset : Cesium.Cartesian2.ZERO,
|
|
35645
|
+
* eyeOffset : Cesium.Cartesian3.ZERO,
|
|
35646
|
+
* horizontalOrigin : Cesium.HorizontalOrigin.LEFT,
|
|
35647
|
+
* verticalOrigin : Cesium.VerticalOrigin.BASELINE,
|
|
35648
|
+
* scale : 1.0,
|
|
35649
|
+
* translucencyByDistance : undefined,
|
|
35650
|
+
* pixelOffsetScaleByDistance : undefined,
|
|
35651
|
+
* heightReference : HeightReference.NONE,
|
|
35652
|
+
* distanceDisplayCondition : undefined
|
|
35653
|
+
* });
|
|
35602
35654
|
* @example
|
|
35603
35655
|
* // Example 2: Specify only the label's cartographic position,
|
|
35604
|
-
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
|
|
35609
|
-
|
|
35656
|
+
* // text, and font.
|
|
35657
|
+
* const l = labels.add({
|
|
35658
|
+
* position : Cesium.Cartesian3.fromRadians(longitude, latitude, height),
|
|
35659
|
+
* text : 'Hello World',
|
|
35660
|
+
* font : '24px Helvetica',
|
|
35661
|
+
* });
|
|
35610
35662
|
* @param [options] - A template describing the label's properties as shown in Example 1.
|
|
35611
35663
|
* @returns The label that was added to the collection.
|
|
35612
35664
|
*/
|
|
@@ -35615,7 +35667,7 @@ export class LabelCollection {
|
|
|
35615
35667
|
* Removes a label from the collection. Once removed, a label is no longer usable.
|
|
35616
35668
|
* @example
|
|
35617
35669
|
* const l = labels.add(...);
|
|
35618
|
-
|
|
35670
|
+
* labels.remove(l); // Returns true
|
|
35619
35671
|
* @param label - The label to remove.
|
|
35620
35672
|
* @returns <code>true</code> if the label was removed; <code>false</code> if the label was not found in the collection.
|
|
35621
35673
|
*/
|
|
@@ -35624,8 +35676,8 @@ export class LabelCollection {
|
|
|
35624
35676
|
* Removes all labels from the collection.
|
|
35625
35677
|
* @example
|
|
35626
35678
|
* labels.add(...);
|
|
35627
|
-
|
|
35628
|
-
|
|
35679
|
+
* labels.add(...);
|
|
35680
|
+
* labels.removeAll();
|
|
35629
35681
|
*/
|
|
35630
35682
|
removeAll(): void;
|
|
35631
35683
|
/**
|
|
@@ -35636,36 +35688,36 @@ export class LabelCollection {
|
|
|
35636
35688
|
contains(label: Label): boolean;
|
|
35637
35689
|
/**
|
|
35638
35690
|
* Returns the label in the collection at the specified index. Indices are zero-based
|
|
35639
|
-
|
|
35640
|
-
|
|
35641
|
-
|
|
35642
|
-
|
|
35691
|
+
* and increase as labels are added. Removing a label shifts all labels after
|
|
35692
|
+
* it to the left, changing their indices. This function is commonly used with
|
|
35693
|
+
* {@link LabelCollection#length} to iterate over all the labels
|
|
35694
|
+
* in the collection.
|
|
35643
35695
|
* @example
|
|
35644
35696
|
* // Toggle the show property of every label in the collection
|
|
35645
|
-
|
|
35646
|
-
|
|
35647
|
-
|
|
35648
|
-
|
|
35649
|
-
|
|
35697
|
+
* const len = labels.length;
|
|
35698
|
+
* for (let i = 0; i < len; ++i) {
|
|
35699
|
+
* const l = billboards.get(i);
|
|
35700
|
+
* l.show = !l.show;
|
|
35701
|
+
* }
|
|
35650
35702
|
* @param index - The zero-based index of the billboard.
|
|
35651
35703
|
* @returns The label at the specified index.
|
|
35652
35704
|
*/
|
|
35653
35705
|
get(index: number): Label;
|
|
35654
35706
|
/**
|
|
35655
35707
|
* Returns true if this object was destroyed; otherwise, false.
|
|
35656
|
-
|
|
35657
|
-
|
|
35658
|
-
|
|
35708
|
+
* <br /><br />
|
|
35709
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
35710
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
35659
35711
|
* @returns True if this object was destroyed; otherwise, false.
|
|
35660
35712
|
*/
|
|
35661
35713
|
isDestroyed(): boolean;
|
|
35662
35714
|
/**
|
|
35663
35715
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
35664
|
-
|
|
35665
|
-
|
|
35666
|
-
|
|
35667
|
-
|
|
35668
|
-
|
|
35716
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
35717
|
+
* <br /><br />
|
|
35718
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
35719
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
35720
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
35669
35721
|
* @example
|
|
35670
35722
|
* labels = labels && labels.destroy();
|
|
35671
35723
|
*/
|
|
@@ -43676,25 +43728,25 @@ export class ViewportQuad {
|
|
|
43676
43728
|
|
|
43677
43729
|
/**
|
|
43678
43730
|
* A cell from a {@link VoxelPrimitive}.
|
|
43679
|
-
<p>
|
|
43680
|
-
Provides access to properties associated with one cell of a voxel primitive.
|
|
43681
|
-
</p>
|
|
43682
|
-
<p>
|
|
43683
|
-
Do not construct this directly. Access it through picking using {@link Scene#pickVoxel}.
|
|
43684
|
-
</p>
|
|
43731
|
+
* <p>
|
|
43732
|
+
* Provides access to properties associated with one cell of a voxel primitive.
|
|
43733
|
+
* </p>
|
|
43734
|
+
* <p>
|
|
43735
|
+
* Do not construct this directly. Access it through picking using {@link Scene#pickVoxel}.
|
|
43736
|
+
* </p>
|
|
43685
43737
|
* @example
|
|
43686
43738
|
* // On left click, display all the properties for a voxel cell in the console log.
|
|
43687
|
-
handler.setInputAction(function(movement) {
|
|
43688
|
-
|
|
43689
|
-
|
|
43690
|
-
|
|
43691
|
-
|
|
43692
|
-
|
|
43693
|
-
|
|
43694
|
-
|
|
43695
|
-
|
|
43696
|
-
|
|
43697
|
-
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
43739
|
+
* handler.setInputAction(function(movement) {
|
|
43740
|
+
* const voxelCell = scene.pickVoxel(movement.position);
|
|
43741
|
+
* if (voxelCell instanceof Cesium.VoxelCell) {
|
|
43742
|
+
* const propertyIds = voxelCell.getPropertyIds();
|
|
43743
|
+
* const length = propertyIds.length;
|
|
43744
|
+
* for (let i = 0; i < length; ++i) {
|
|
43745
|
+
* const propertyId = propertyIds[i];
|
|
43746
|
+
* console.log(`{propertyId}: ${voxelCell.getProperty(propertyId)}`);
|
|
43747
|
+
* }
|
|
43748
|
+
* }
|
|
43749
|
+
* }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
43698
43750
|
* @param primitive - The voxel primitive containing the cell
|
|
43699
43751
|
* @param tileIndex - The index of the tile
|
|
43700
43752
|
* @param sampleIndex - The index of the sample within the tile, containing metadata for this cell
|
|
@@ -43703,7 +43755,7 @@ export class VoxelCell {
|
|
|
43703
43755
|
constructor(primitive: VoxelPrimitive, tileIndex: number, sampleIndex: number);
|
|
43704
43756
|
/**
|
|
43705
43757
|
* All objects returned by {@link Scene#pick} have a <code>primitive</code> property. This returns
|
|
43706
|
-
|
|
43758
|
+
* the VoxelPrimitive containing the cell.
|
|
43707
43759
|
*/
|
|
43708
43760
|
readonly primitive: VoxelPrimitive;
|
|
43709
43761
|
/**
|
|
@@ -43733,17 +43785,51 @@ export class VoxelCell {
|
|
|
43733
43785
|
* Returns a copy of the value of the metadata in the cell with the given name.
|
|
43734
43786
|
* @example
|
|
43735
43787
|
* // Display all the properties for a voxel cell in the console log.
|
|
43736
|
-
|
|
43737
|
-
|
|
43738
|
-
|
|
43739
|
-
|
|
43740
|
-
|
|
43788
|
+
* const names = voxelCell.getNames();
|
|
43789
|
+
* for (let i = 0; i < names.length; ++i) {
|
|
43790
|
+
* const name = names[i];
|
|
43791
|
+
* console.log(`{name}: ${voxelCell.getProperty(name)}`);
|
|
43792
|
+
* }
|
|
43741
43793
|
* @param name - The case-sensitive name of the property.
|
|
43742
43794
|
* @returns The value of the property or <code>undefined</code> if the feature does not have this property.
|
|
43743
43795
|
*/
|
|
43744
43796
|
getProperty(name: string): any;
|
|
43745
43797
|
}
|
|
43746
43798
|
|
|
43799
|
+
/**
|
|
43800
|
+
* <div class="notice">
|
|
43801
|
+
* To construct a VoxelContent, call {@link VoxelContent.fromMetadataArray} or {@link VoxelContent.fromGltf}. Do not call the constructor directly.
|
|
43802
|
+
* </div>
|
|
43803
|
+
* An object representing voxel content for a {@link Cesium3DTilesVoxelProvider}.
|
|
43804
|
+
*/
|
|
43805
|
+
export class VoxelContent {
|
|
43806
|
+
constructor();
|
|
43807
|
+
/**
|
|
43808
|
+
* Constructs a VoxelContent from an array of metadata.
|
|
43809
|
+
* @param metadata - The metadata to use for this voxel content.
|
|
43810
|
+
* @returns A VoxelContent containing the specified metadata.
|
|
43811
|
+
*/
|
|
43812
|
+
static fromMetadataArray(metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[]): VoxelContent;
|
|
43813
|
+
}
|
|
43814
|
+
|
|
43815
|
+
/**
|
|
43816
|
+
* The metadata for this voxel content.
|
|
43817
|
+
* The metadata is an array of typed arrays, one for each field.
|
|
43818
|
+
* The data for one field is a flattened 3D array ordered by X, then Y, then Z.
|
|
43819
|
+
*/
|
|
43820
|
+
export const metadata: Int8Array[] | Uint8Array[] | Int16Array[] | Uint16Array[] | Int32Array[] | Uint32Array[] | Float32Array[] | Float64Array[];
|
|
43821
|
+
|
|
43822
|
+
/**
|
|
43823
|
+
* Metadata ordering for voxel content.
|
|
43824
|
+
* In all cases, x data is contiguous in strides along the y axis,
|
|
43825
|
+
* and each group of y strides represents a z slice.
|
|
43826
|
+
* However, the orientation of the axes follows different conventions.
|
|
43827
|
+
*/
|
|
43828
|
+
export enum VoxelMetadataOrder {
|
|
43829
|
+
XYZ = 0,
|
|
43830
|
+
GLTF = 1
|
|
43831
|
+
}
|
|
43832
|
+
|
|
43747
43833
|
/**
|
|
43748
43834
|
* A primitive that renders voxel data from a {@link VoxelProvider}.
|
|
43749
43835
|
* @param [options] - Object with the following properties:
|
|
@@ -43751,6 +43837,7 @@ export class VoxelCell {
|
|
|
43751
43837
|
* @param [options.modelMatrix = Matrix4.IDENTITY] - The model matrix used to transform the primitive.
|
|
43752
43838
|
* @param [options.customShader] - The custom shader used to style the primitive.
|
|
43753
43839
|
* @param [options.clock] - The clock used to control time dynamic behavior.
|
|
43840
|
+
* @param [options.calculateStatistics] - Generate statistics for performance profile.
|
|
43754
43841
|
*/
|
|
43755
43842
|
export class VoxelPrimitive {
|
|
43756
43843
|
constructor(options?: {
|
|
@@ -43758,94 +43845,91 @@ export class VoxelPrimitive {
|
|
|
43758
43845
|
modelMatrix?: Matrix4;
|
|
43759
43846
|
customShader?: CustomShader;
|
|
43760
43847
|
clock?: Clock;
|
|
43848
|
+
calculateStatistics?: boolean;
|
|
43761
43849
|
});
|
|
43762
|
-
/**
|
|
43763
|
-
* The number of levels of detail containing available tiles in the tileset.
|
|
43764
|
-
*/
|
|
43765
|
-
readonly availableLevels: number | undefined;
|
|
43766
43850
|
/**
|
|
43767
43851
|
* The event fired to indicate that a tile's content was loaded.
|
|
43768
|
-
|
|
43769
|
-
|
|
43770
|
-
|
|
43771
|
-
|
|
43772
|
-
|
|
43852
|
+
* <p>
|
|
43853
|
+
* This event is fired during the tileset traversal while the frame is being rendered
|
|
43854
|
+
* so that updates to the tile take effect in the same frame. Do not create or modify
|
|
43855
|
+
* Cesium entities or primitives during the event listener.
|
|
43856
|
+
* </p>
|
|
43773
43857
|
* @example
|
|
43774
43858
|
* voxelPrimitive.tileLoad.addEventListener(function() {
|
|
43775
|
-
|
|
43776
|
-
|
|
43859
|
+
* console.log('A tile was loaded.');
|
|
43860
|
+
* });
|
|
43777
43861
|
*/
|
|
43778
43862
|
tileLoad: Event;
|
|
43779
43863
|
/**
|
|
43780
43864
|
* This event fires once for each visible tile in a frame.
|
|
43781
|
-
|
|
43782
|
-
|
|
43865
|
+
* <p>
|
|
43866
|
+
* This event is fired during the traversal while the frame is being rendered.
|
|
43783
43867
|
* @example
|
|
43784
43868
|
* voxelPrimitive.tileVisible.addEventListener(function() {
|
|
43785
|
-
|
|
43786
|
-
|
|
43869
|
+
* console.log('A tile is visible.');
|
|
43870
|
+
* });
|
|
43787
43871
|
*/
|
|
43788
43872
|
tileVisible: Event;
|
|
43789
43873
|
/**
|
|
43790
43874
|
* The event fired to indicate that a tile's content failed to load.
|
|
43791
43875
|
* @example
|
|
43792
43876
|
* voxelPrimitive.tileFailed.addEventListener(function() {
|
|
43793
|
-
|
|
43794
|
-
|
|
43877
|
+
* console.log('An error occurred loading tile.');
|
|
43878
|
+
* });
|
|
43795
43879
|
*/
|
|
43796
43880
|
tileFailed: Event;
|
|
43797
43881
|
/**
|
|
43798
43882
|
* The event fired to indicate that a tile's content was unloaded.
|
|
43799
43883
|
* @example
|
|
43800
43884
|
* voxelPrimitive.tileUnload.addEventListener(function() {
|
|
43801
|
-
|
|
43802
|
-
|
|
43885
|
+
* console.log('A tile was unloaded from the cache.');
|
|
43886
|
+
* });
|
|
43803
43887
|
*/
|
|
43804
43888
|
tileUnload: Event;
|
|
43805
43889
|
/**
|
|
43806
43890
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
43807
|
-
|
|
43808
|
-
|
|
43809
|
-
|
|
43810
|
-
|
|
43811
|
-
|
|
43812
|
-
|
|
43813
|
-
|
|
43814
|
-
|
|
43815
|
-
|
|
43891
|
+
* is requested, when a requested tile is finished downloading, and when a downloaded tile has been
|
|
43892
|
+
* processed and is ready to render.
|
|
43893
|
+
* <p>
|
|
43894
|
+
* The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
|
|
43895
|
+
* processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
|
|
43896
|
+
* </p>
|
|
43897
|
+
* <p>
|
|
43898
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
43899
|
+
* </p>
|
|
43816
43900
|
* @example
|
|
43817
43901
|
* voxelPrimitive.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
43818
|
-
|
|
43819
|
-
|
|
43820
|
-
|
|
43821
|
-
|
|
43822
|
-
|
|
43823
|
-
|
|
43824
|
-
|
|
43902
|
+
* if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
43903
|
+
* console.log('Finished loading');
|
|
43904
|
+
* return;
|
|
43905
|
+
* }
|
|
43906
|
+
*
|
|
43907
|
+
* console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
|
|
43908
|
+
* });
|
|
43825
43909
|
*/
|
|
43826
43910
|
loadProgress: Event;
|
|
43827
43911
|
/**
|
|
43828
43912
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The voxel
|
|
43829
|
-
|
|
43830
|
-
|
|
43831
|
-
|
|
43832
|
-
|
|
43913
|
+
* primitive is completely loaded for this view.
|
|
43914
|
+
* <p>
|
|
43915
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
43916
|
+
* </p>
|
|
43833
43917
|
* @example
|
|
43834
43918
|
* voxelPrimitive.allTilesLoaded.addEventListener(function() {
|
|
43835
|
-
|
|
43836
|
-
|
|
43919
|
+
* console.log('All tiles are loaded');
|
|
43920
|
+
* });
|
|
43837
43921
|
*/
|
|
43838
43922
|
allTilesLoaded: Event;
|
|
43839
43923
|
/**
|
|
43840
43924
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
43841
|
-
|
|
43842
|
-
|
|
43843
|
-
|
|
43844
|
-
|
|
43925
|
+
* is fired once when all tiles in the initial view are loaded.
|
|
43926
|
+
* <p>
|
|
43927
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
43928
|
+
* </p>
|
|
43845
43929
|
* @example
|
|
43846
43930
|
* voxelPrimitive.initialTilesLoaded.addEventListener(function() {
|
|
43847
|
-
|
|
43848
|
-
|
|
43931
|
+
* console.log('Initial tiles are loaded');
|
|
43932
|
+
* });
|
|
43849
43933
|
*/
|
|
43850
43934
|
initialTilesLoaded: Event;
|
|
43851
43935
|
/**
|
|
@@ -43873,9 +43957,23 @@ export class VoxelPrimitive {
|
|
|
43873
43957
|
*/
|
|
43874
43958
|
readonly shape: VoxelShapeType;
|
|
43875
43959
|
/**
|
|
43876
|
-
* Gets the voxel
|
|
43960
|
+
* Gets the dimensions of each voxel tile, in z-up orientation.
|
|
43961
|
+
* Does not include padding.
|
|
43877
43962
|
*/
|
|
43878
43963
|
readonly dimensions: Cartesian3;
|
|
43964
|
+
/**
|
|
43965
|
+
* Gets the dimensions of one tile of the input voxel data, in the input orientation.
|
|
43966
|
+
* Includes padding.
|
|
43967
|
+
*/
|
|
43968
|
+
readonly inputDimensions: Cartesian3;
|
|
43969
|
+
/**
|
|
43970
|
+
* Gets the padding before the voxel data.
|
|
43971
|
+
*/
|
|
43972
|
+
readonly paddingBefore: Cartesian3;
|
|
43973
|
+
/**
|
|
43974
|
+
* Gets the padding after the voxel data.
|
|
43975
|
+
*/
|
|
43976
|
+
readonly paddingAfter: Cartesian3;
|
|
43879
43977
|
/**
|
|
43880
43978
|
* Gets the minimum value per channel of the voxel data.
|
|
43881
43979
|
*/
|
|
@@ -43906,35 +44004,35 @@ export class VoxelPrimitive {
|
|
|
43906
44004
|
nearestSampling: boolean;
|
|
43907
44005
|
/**
|
|
43908
44006
|
* Gets or sets the screen space error in pixels. If the screen space size
|
|
43909
|
-
|
|
43910
|
-
|
|
43911
|
-
|
|
44007
|
+
* of a voxel is greater than the screen space error, the tile is subdivided.
|
|
44008
|
+
* Lower screen space error corresponds with higher detail rendering, but could
|
|
44009
|
+
* result in worse performance and higher memory consumption.
|
|
43912
44010
|
*/
|
|
43913
44011
|
screenSpaceError: number;
|
|
43914
44012
|
/**
|
|
43915
44013
|
* Gets or sets the step size multiplier used during raymarching.
|
|
43916
|
-
|
|
43917
|
-
|
|
44014
|
+
* The lower the value, the higher the rendering quality, but
|
|
44015
|
+
* also the worse the performance.
|
|
43918
44016
|
*/
|
|
43919
44017
|
stepSize: number;
|
|
43920
44018
|
/**
|
|
43921
44019
|
* Gets or sets the minimum bounds in the shape's local coordinate system.
|
|
43922
|
-
|
|
44020
|
+
* Voxel data is stretched or squashed to fit the bounds.
|
|
43923
44021
|
*/
|
|
43924
44022
|
minBounds: Cartesian3;
|
|
43925
44023
|
/**
|
|
43926
44024
|
* Gets or sets the maximum bounds in the shape's local coordinate system.
|
|
43927
|
-
|
|
44025
|
+
* Voxel data is stretched or squashed to fit the bounds.
|
|
43928
44026
|
*/
|
|
43929
44027
|
maxBounds: Cartesian3;
|
|
43930
44028
|
/**
|
|
43931
44029
|
* Gets or sets the minimum clipping location in the shape's local coordinate system.
|
|
43932
|
-
|
|
44030
|
+
* Any voxel content outside the range is clipped.
|
|
43933
44031
|
*/
|
|
43934
44032
|
minClippingBounds: Cartesian3;
|
|
43935
44033
|
/**
|
|
43936
44034
|
* Gets or sets the maximum clipping location in the shape's local coordinate system.
|
|
43937
|
-
|
|
44035
|
+
* Any voxel content outside the range is clipped.
|
|
43938
44036
|
*/
|
|
43939
44037
|
maxClippingBounds: Cartesian3;
|
|
43940
44038
|
/**
|
|
@@ -43951,19 +44049,19 @@ export class VoxelPrimitive {
|
|
|
43951
44049
|
readonly customShaderCompilationEvent: Event;
|
|
43952
44050
|
/**
|
|
43953
44051
|
* Returns true if this object was destroyed; otherwise, false.
|
|
43954
|
-
|
|
43955
|
-
|
|
43956
|
-
|
|
44052
|
+
* <br /><br />
|
|
44053
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
44054
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
43957
44055
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
43958
44056
|
*/
|
|
43959
44057
|
isDestroyed(): boolean;
|
|
43960
44058
|
/**
|
|
43961
44059
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
43962
|
-
|
|
43963
|
-
|
|
43964
|
-
|
|
43965
|
-
|
|
43966
|
-
|
|
44060
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
44061
|
+
* <br /><br />
|
|
44062
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
44063
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
44064
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
43967
44065
|
* @example
|
|
43968
44066
|
* voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
|
|
43969
44067
|
*/
|
|
@@ -43972,96 +44070,89 @@ export class VoxelPrimitive {
|
|
|
43972
44070
|
|
|
43973
44071
|
/**
|
|
43974
44072
|
* Provides voxel data. Intended to be used with {@link VoxelPrimitive}.
|
|
43975
|
-
This type describes an interface and is not intended to be instantiated directly.
|
|
44073
|
+
* This type describes an interface and is not intended to be instantiated directly.
|
|
43976
44074
|
*/
|
|
43977
44075
|
export class VoxelProvider {
|
|
43978
44076
|
constructor();
|
|
43979
44077
|
/**
|
|
43980
|
-
* A transform from local space to global space.
|
|
44078
|
+
* A transform from local space to global space.
|
|
43981
44079
|
*/
|
|
43982
|
-
readonly globalTransform: Matrix4
|
|
44080
|
+
readonly globalTransform: Matrix4;
|
|
43983
44081
|
/**
|
|
43984
|
-
* A transform from shape space to local space.
|
|
44082
|
+
* A transform from shape space to local space.
|
|
43985
44083
|
*/
|
|
43986
|
-
readonly shapeTransform: Matrix4
|
|
44084
|
+
readonly shapeTransform: Matrix4;
|
|
43987
44085
|
/**
|
|
43988
44086
|
* Gets the {@link VoxelShapeType}
|
|
43989
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
43990
44087
|
*/
|
|
43991
44088
|
readonly shape: VoxelShapeType;
|
|
43992
44089
|
/**
|
|
43993
44090
|
* Gets the minimum bounds.
|
|
43994
|
-
|
|
43995
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44091
|
+
* If undefined, the shape's default minimum bounds will be used instead.
|
|
43996
44092
|
*/
|
|
43997
44093
|
readonly minBounds: Cartesian3 | undefined;
|
|
43998
44094
|
/**
|
|
43999
44095
|
* Gets the maximum bounds.
|
|
44000
|
-
|
|
44001
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44096
|
+
* If undefined, the shape's default maximum bounds will be used instead.
|
|
44002
44097
|
*/
|
|
44003
44098
|
readonly maxBounds: Cartesian3 | undefined;
|
|
44004
44099
|
/**
|
|
44005
44100
|
* Gets the number of voxels per dimension of a tile. This is the same for all tiles in the dataset.
|
|
44006
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44007
44101
|
*/
|
|
44008
44102
|
readonly dimensions: Cartesian3;
|
|
44009
44103
|
/**
|
|
44010
44104
|
* Gets the number of padding voxels before the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
44011
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44012
44105
|
*/
|
|
44013
|
-
readonly paddingBefore: Cartesian3
|
|
44106
|
+
readonly paddingBefore: Cartesian3;
|
|
44014
44107
|
/**
|
|
44015
44108
|
* Gets the number of padding voxels after the tile. This improves rendering quality when sampling the edge of a tile, but it increases memory usage.
|
|
44016
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44017
44109
|
*/
|
|
44018
|
-
readonly paddingAfter: Cartesian3
|
|
44110
|
+
readonly paddingAfter: Cartesian3;
|
|
44019
44111
|
/**
|
|
44020
44112
|
* Gets the metadata names.
|
|
44021
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44022
44113
|
*/
|
|
44023
44114
|
readonly names: string[];
|
|
44024
44115
|
/**
|
|
44025
44116
|
* Gets the metadata types.
|
|
44026
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44027
44117
|
*/
|
|
44028
44118
|
readonly types: MetadataType[];
|
|
44029
44119
|
/**
|
|
44030
44120
|
* Gets the metadata component types.
|
|
44031
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44032
44121
|
*/
|
|
44033
44122
|
readonly componentTypes: MetadataComponentType[];
|
|
44123
|
+
/**
|
|
44124
|
+
* Gets the ordering of the metadata in the buffers.
|
|
44125
|
+
*/
|
|
44126
|
+
readonly metadataOrder: VoxelMetadataOrder;
|
|
44034
44127
|
/**
|
|
44035
44128
|
* Gets the metadata minimum values.
|
|
44036
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44037
44129
|
*/
|
|
44038
44130
|
readonly minimumValues: number[][] | undefined;
|
|
44039
44131
|
/**
|
|
44040
44132
|
* Gets the metadata maximum values.
|
|
44041
|
-
This should not be called before {@link VoxelProvider#ready} returns true.
|
|
44042
44133
|
*/
|
|
44043
44134
|
readonly maximumValues: number[][] | undefined;
|
|
44044
44135
|
/**
|
|
44045
|
-
* The maximum number of tiles that exist for this provider.
|
|
44046
|
-
|
|
44136
|
+
* The maximum number of tiles that exist for this provider.
|
|
44137
|
+
* This value is used as a hint to the voxel renderer to allocate an appropriate amount of GPU memory.
|
|
44138
|
+
* If this value is not known it can be undefined.
|
|
44047
44139
|
*/
|
|
44048
44140
|
readonly maximumTileCount: number | undefined;
|
|
44049
44141
|
/**
|
|
44050
|
-
* Requests the data for a given tile.
|
|
44051
|
-
This function should not be called before {@link VoxelProvider#ready} returns true.
|
|
44142
|
+
* Requests the data for a given tile.
|
|
44052
44143
|
* @param [options] - Object with the following properties:
|
|
44053
44144
|
* @param [options.tileLevel = 0] - The tile's level.
|
|
44054
44145
|
* @param [options.tileX = 0] - The tile's X coordinate.
|
|
44055
44146
|
* @param [options.tileY = 0] - The tile's Y coordinate.
|
|
44056
44147
|
* @param [options.tileZ = 0] - The tile's Z coordinate.
|
|
44057
|
-
* @returns A promise to
|
|
44148
|
+
* @returns A promise resolving to a VoxelContent containing the data for the tile, or undefined if the request could not be scheduled this frame.
|
|
44058
44149
|
*/
|
|
44059
44150
|
requestData(options?: {
|
|
44060
44151
|
tileLevel?: number;
|
|
44061
44152
|
tileX?: number;
|
|
44062
44153
|
tileY?: number;
|
|
44063
44154
|
tileZ?: number;
|
|
44064
|
-
}): Promise<
|
|
44155
|
+
}): Promise<VoxelContent> | undefined;
|
|
44065
44156
|
}
|
|
44066
44157
|
|
|
44067
44158
|
/**
|
|
@@ -44069,19 +44160,6 @@ export class VoxelProvider {
|
|
|
44069
44160
|
*/
|
|
44070
44161
|
export const availableLevels: number | undefined;
|
|
44071
44162
|
|
|
44072
|
-
export const shaderUniforms: {
|
|
44073
|
-
[key: string]: any;
|
|
44074
|
-
};
|
|
44075
|
-
|
|
44076
|
-
export const shaderDefines: {
|
|
44077
|
-
[key: string]: any;
|
|
44078
|
-
};
|
|
44079
|
-
|
|
44080
|
-
/**
|
|
44081
|
-
* The maximum number of intersections against the shape for any ray direction.
|
|
44082
|
-
*/
|
|
44083
|
-
export const shaderMaximumIntersectionsLength: number;
|
|
44084
|
-
|
|
44085
44163
|
/**
|
|
44086
44164
|
* An enum of voxel shapes. The shape controls how the voxel grid is mapped to 3D space.
|
|
44087
44165
|
*/
|