@rtzh/engine 0.0.5 → 0.0.7
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/Workers/chunk-243UEBJF.js +1045 -0
- package/Build/Workers/chunk-2UNHFFAZ.js +352 -0
- package/Build/Workers/chunk-2Y2KA6PM.js +387 -0
- package/Build/Workers/chunk-2ZXYLPPT.js +163 -0
- package/Build/Workers/chunk-32ZGDYJY.js +3514 -0
- package/Build/Workers/chunk-3NSMZ3XW.js +1067 -0
- package/Build/Workers/chunk-3WT5VKYM.js +101 -0
- package/Build/Workers/chunk-4DIL24GG.js +1460 -0
- package/Build/Workers/chunk-4FEDW3WT.js +299 -0
- package/Build/Workers/chunk-4IXXMXPJ.js +682 -0
- package/Build/Workers/chunk-4SC4KVID.js +692 -0
- package/Build/Workers/chunk-52UUGJQ6.js +288 -0
- package/Build/Workers/chunk-53AFSDGM.js +37 -0
- package/Build/Workers/chunk-54LZ6OUD.js +1067 -0
- package/Build/Workers/chunk-54SSO7NS.js +352 -0
- package/Build/Workers/chunk-565HBO3F.js +352 -0
- package/Build/Workers/chunk-5L3PEFKO.js +629 -0
- package/Build/Workers/chunk-5RMI6LFO.js +692 -0
- package/Build/Workers/chunk-5SVTAJRH.js +837 -0
- package/Build/Workers/chunk-5VDZEVQX.js +788 -0
- package/Build/Workers/chunk-5VWFNSLF.js +44 -0
- package/Build/Workers/chunk-5W4ISZGQ.js +1483 -0
- package/Build/Workers/chunk-5ZMMQ7HE.js +37 -0
- package/Build/Workers/chunk-64VDO4BW.js +114 -0
- package/Build/Workers/chunk-6AUSOZOL.js +476 -0
- package/Build/Workers/chunk-6BIU5AL4.js +692 -0
- package/Build/Workers/chunk-6KA3AJM6.js +455 -0
- package/Build/Workers/chunk-6MYDYE24.js +280 -0
- package/Build/Workers/chunk-6RUDXAFC.js +2719 -0
- package/Build/Workers/chunk-6YSUD2OH.js +219 -0
- package/Build/Workers/chunk-6YT2LZ3Z.js +1443 -0
- package/Build/Workers/chunk-73EGVDOC.js +398 -0
- package/Build/Workers/chunk-7BOVULMD.js +44 -0
- package/Build/Workers/chunk-7KOMCIWI.js +8366 -0
- package/Build/Workers/chunk-7MMYV5PM.js +288 -0
- package/Build/Workers/chunk-7QPQGSS3.js +57 -0
- package/Build/Workers/chunk-AEURJQ3B.js +73 -0
- package/Build/Workers/chunk-AMJRLIO3.js +414 -0
- package/Build/Workers/chunk-APOATHFZ.js +138 -0
- package/Build/Workers/chunk-AVNHAFMV.js +114 -0
- package/Build/Workers/chunk-AWMYTHW4.js +101 -0
- package/Build/Workers/chunk-BCYABDWF.js +3514 -0
- package/Build/Workers/chunk-BJHSYHOQ.js +97 -0
- package/Build/Workers/chunk-BM6ZG63T.js +171 -0
- package/Build/Workers/chunk-C3G2NDXM.js +162 -0
- package/Build/Workers/chunk-CTARL7CY.js +511 -0
- package/Build/Workers/chunk-DIA4J2DB.js +497 -0
- package/Build/Workers/chunk-E3NHG3TR.js +1460 -0
- package/Build/Workers/chunk-E5BSDIGY.js +139 -0
- package/Build/Workers/chunk-EDVAQGDJ.js +2719 -0
- package/Build/Workers/chunk-EFHDO3L2.js +102 -0
- package/Build/Workers/chunk-EJVGOIOW.js +1317 -0
- package/Build/Workers/chunk-EPVJ5OOH.js +8366 -0
- package/Build/Workers/chunk-ERYOZBVC.js +171 -0
- package/Build/Workers/chunk-ET7LWDHA.js +58 -0
- package/Build/Workers/chunk-EWDHM5NC.js +37 -0
- package/Build/Workers/chunk-F4Q3VOCC.js +1317 -0
- package/Build/Workers/chunk-FCSN7XOU.js +55 -0
- package/Build/Workers/chunk-FD62YGTB.js +219 -0
- package/Build/Workers/chunk-FHM3HFYM.js +1045 -0
- package/Build/Workers/chunk-FNI64UKI.js +57 -0
- package/Build/Workers/chunk-FRUZKVBP.js +352 -0
- package/Build/Workers/chunk-FSYQE5XE.js +55 -0
- package/Build/Workers/chunk-FYW5UQ24.js +837 -0
- package/Build/Workers/chunk-FYZVCB32.js +75 -0
- package/Build/Workers/chunk-G7PGTG3P.js +387 -0
- package/Build/Workers/chunk-GAQXLBFJ.js +1483 -0
- package/Build/Workers/chunk-GEH53ULL.js +299 -0
- package/Build/Workers/chunk-GLA2PT5T.js +476 -0
- package/Build/Workers/chunk-GWLEBUVI.js +2058 -0
- package/Build/Workers/chunk-GYIGOBV2.js +439 -0
- package/Build/Workers/chunk-GZMTBQM2.js +1443 -0
- package/Build/Workers/chunk-H2MM7FMU.js +1054 -0
- package/Build/Workers/chunk-H33FCT5U.js +940 -0
- package/Build/Workers/chunk-HAR6Y2HP.js +1800 -0
- package/Build/Workers/chunk-HBL3QZ2L.js +642 -0
- package/Build/Workers/chunk-HEKLTOOR.js +1443 -0
- package/Build/Workers/chunk-HM4MH5IG.js +138 -0
- package/Build/Workers/chunk-I5JHYEIE.js +241 -0
- package/Build/Workers/chunk-IB2XQV6U.js +101 -0
- package/Build/Workers/chunk-IC2JHDCI.js +114 -0
- package/Build/Workers/chunk-IEEHNZ36.js +241 -0
- package/Build/Workers/chunk-IRG63TBY.js +55 -0
- package/Build/Workers/chunk-IXM65GBF.js +256 -0
- package/Build/Workers/chunk-IY53MZW2.js +58 -0
- package/Build/Workers/chunk-IYAZCFAC.js +642 -0
- package/Build/Workers/chunk-J2CUNLQP.js +940 -0
- package/Build/Workers/chunk-J766O3PA.js +256 -0
- package/Build/Workers/chunk-JRPAFYGJ.js +1054 -0
- package/Build/Workers/chunk-JWEZXKBE.js +73 -0
- package/Build/Workers/chunk-KFOT2YV5.js +138 -0
- package/Build/Workers/chunk-KGQGZ7PF.js +778 -0
- package/Build/Workers/chunk-KMZXZUA7.js +1460 -0
- package/Build/Workers/chunk-KOVKY3HB.js +198 -0
- package/Build/Workers/chunk-KQ4ET526.js +163 -0
- package/Build/Workers/chunk-L2QIVAZV.js +3514 -0
- package/Build/Workers/chunk-LGMONS4O.js +1317 -0
- package/Build/Workers/chunk-LJHG4PJQ.js +305 -0
- package/Build/Workers/chunk-LNS36LUZ.js +2058 -0
- package/Build/Workers/chunk-LPJHTJDQ.js +305 -0
- package/Build/Workers/chunk-LRW2QXMW.js +352 -0
- package/Build/Workers/chunk-LUUEGFLT.js +305 -0
- package/Build/Workers/chunk-LW2VGHDM.js +1800 -0
- package/Build/Workers/chunk-LXM2ZC4V.js +288 -0
- package/Build/Workers/chunk-LXMLERGC.js +1067 -0
- package/Build/Workers/chunk-MEFWVMG6.js +788 -0
- package/Build/Workers/chunk-MJVNNURF.js +368 -0
- package/Build/Workers/chunk-MWN26ZEM.js +280 -0
- package/Build/Workers/chunk-NIWB6UMY.js +198 -0
- package/Build/Workers/chunk-NJEG7WRW.js +387 -0
- package/Build/Workers/chunk-O224ZEA5.js +58 -0
- package/Build/Workers/chunk-O5ICO3AS.js +682 -0
- package/Build/Workers/chunk-O5QH7XD5.js +629 -0
- package/Build/Workers/chunk-O6T3T3V3.js +97 -0
- package/Build/Workers/chunk-OBM2JYMG.js +75 -0
- package/Build/Workers/chunk-ODZZZGXK.js +219 -0
- package/Build/Workers/chunk-OFTWEOW2.js +1483 -0
- package/Build/Workers/chunk-OIJH6LAY.js +497 -0
- package/Build/Workers/chunk-OJFVD5ZS.js +778 -0
- package/Build/Workers/chunk-OJNPKCEL.js +73 -0
- package/Build/Workers/chunk-PQLZOYZE.js +642 -0
- package/Build/Workers/chunk-PU44PXY2.js +75 -0
- package/Build/Workers/chunk-Q36VXWGP.js +57 -0
- package/Build/Workers/chunk-Q4XPVYXJ.js +476 -0
- package/Build/Workers/chunk-QGXE4VZ3.js +55 -0
- package/Build/Workers/chunk-QIEHP7O4.js +280 -0
- package/Build/Workers/chunk-QY55DT53.js +97 -0
- package/Build/Workers/chunk-R3PTQZ6H.js +44 -0
- package/Build/Workers/chunk-RJVB3K2X.js +511 -0
- package/Build/Workers/chunk-RORZNBGJ.js +299 -0
- package/Build/Workers/chunk-RRBGLANL.js +55 -0
- package/Build/Workers/chunk-RT7PY6BH.js +2719 -0
- package/Build/Workers/chunk-SAD42JSM.js +102 -0
- package/Build/Workers/chunk-SBR7MW44.js +139 -0
- package/Build/Workers/chunk-SFM3GNS2.js +682 -0
- package/Build/Workers/chunk-SKXE77AM.js +139 -0
- package/Build/Workers/chunk-SLYUIIFB.js +455 -0
- package/Build/Workers/chunk-SQSWONTJ.js +241 -0
- package/Build/Workers/chunk-SRLJWNU2.js +368 -0
- package/Build/Workers/chunk-SZELHE7Q.js +163 -0
- package/Build/Workers/chunk-T4LDJBKR.js +124 -0
- package/Build/Workers/chunk-TBASKFFL.js +124 -0
- package/Build/Workers/chunk-TDGGEIZE.js +398 -0
- package/Build/Workers/chunk-TQ63SH2Z.js +352 -0
- package/Build/Workers/chunk-U3VI26GL.js +162 -0
- package/Build/Workers/chunk-U77FLUQF.js +368 -0
- package/Build/Workers/chunk-UIYQEJ5H.js +1054 -0
- package/Build/Workers/chunk-UJ72JOGF.js +511 -0
- package/Build/Workers/chunk-UY7I27VQ.js +1800 -0
- package/Build/Workers/chunk-VLB25GGE.js +439 -0
- package/Build/Workers/chunk-VVKDT4J7.js +837 -0
- package/Build/Workers/chunk-VXDOONLH.js +162 -0
- package/Build/Workers/chunk-W4DV7TAL.js +8366 -0
- package/Build/Workers/chunk-WFTPZ3ZX.js +788 -0
- package/Build/Workers/chunk-WLIQ26XU.js +455 -0
- package/Build/Workers/chunk-WOEPS2UA.js +171 -0
- package/Build/Workers/chunk-WWLWTSMV.js +55 -0
- package/Build/Workers/chunk-WX2ZANQC.js +940 -0
- package/Build/Workers/chunk-XEB4GEXW.js +629 -0
- package/Build/Workers/chunk-XFKTM6GN.js +2058 -0
- package/Build/Workers/chunk-XKBR7TJB.js +398 -0
- package/Build/Workers/chunk-XYRT4RDI.js +1045 -0
- package/Build/Workers/chunk-XZINQPR6.js +124 -0
- package/Build/Workers/chunk-YLKTSY65.js +414 -0
- package/Build/Workers/chunk-YLSZYTTO.js +102 -0
- package/Build/Workers/chunk-YQXKIGXX.js +414 -0
- package/Build/Workers/chunk-YR3LX3PR.js +497 -0
- package/Build/Workers/chunk-Z5MHVJGN.js +778 -0
- package/Build/Workers/chunk-ZBRVFEGF.js +256 -0
- package/Build/Workers/chunk-ZCPCQJBX.js +198 -0
- package/Build/Workers/chunk-ZS7KQSEM.js +439 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Scene/Cesium3DTileset.js +4163 -4105
- package/Source/Scene/Model/BarycentricWireframePipelineStage.js +327 -73
- package/Source/Scene/Model/Model.js +3631 -3512
- package/Source/Scene/Model/Model3DTileContent.js +585 -568
- package/Source/Scene/Model/ModelRuntimePrimitive.js +391 -391
- package/Source/Scene/Model/WireframePipelineStage.js +122 -122
- package/Source/Shaders/Model/ModelFS.glsl +38 -2
- package/Source/Shaders/Model/ModelFS.js +38 -2
- package/Source/Shaders/Model/ModelVS.glsl +3 -0
- package/Source/Shaders/Model/ModelVS.js +3 -0
- package/index.d.ts +801 -773
- package/index.js +145 -145
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -29022,7 +29022,7 @@ export namespace Cesium3DTileset {
|
|
|
29022
29022
|
};
|
|
29023
29023
|
/**
|
|
29024
29024
|
* Optimization option. Used as a callback when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
29025
|
-
|
|
29025
|
+
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
29026
29026
|
* @param p - The start value to interpolate.
|
|
29027
29027
|
* @param q - The end value to interpolate.
|
|
29028
29028
|
* @param time - The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
|
|
@@ -29032,54 +29032,54 @@ export namespace Cesium3DTileset {
|
|
|
29032
29032
|
|
|
29033
29033
|
/**
|
|
29034
29034
|
* A {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29035
|
-
used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29036
|
-
|
|
29037
|
-
<div class="notice">
|
|
29038
|
-
This object is normally not instantiated directly, use {@link Cesium3DTileset.fromUrl}.
|
|
29039
|
-
</div>
|
|
29035
|
+
* used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29036
|
+
*
|
|
29037
|
+
* <div class="notice">
|
|
29038
|
+
* This object is normally not instantiated directly, use {@link Cesium3DTileset.fromUrl}.
|
|
29039
|
+
* </div>
|
|
29040
29040
|
* @example
|
|
29041
29041
|
* try {
|
|
29042
|
-
|
|
29043
|
-
|
|
29044
|
-
|
|
29045
|
-
|
|
29046
|
-
} catch (error) {
|
|
29047
|
-
|
|
29048
|
-
}
|
|
29042
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29043
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json"
|
|
29044
|
+
* );
|
|
29045
|
+
* scene.primitives.add(tileset);
|
|
29046
|
+
* } catch (error) {
|
|
29047
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29048
|
+
* }
|
|
29049
29049
|
* @example
|
|
29050
29050
|
* // Turn on camera collisions with the tileset.
|
|
29051
|
-
try {
|
|
29052
|
-
|
|
29053
|
-
|
|
29054
|
-
|
|
29055
|
-
|
|
29056
|
-
|
|
29057
|
-
} catch (error) {
|
|
29058
|
-
|
|
29059
|
-
}
|
|
29051
|
+
* try {
|
|
29052
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29053
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json",
|
|
29054
|
+
* { enableCollision: true }
|
|
29055
|
+
* );
|
|
29056
|
+
* scene.primitives.add(tileset);
|
|
29057
|
+
* } catch (error) {
|
|
29058
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29059
|
+
* }
|
|
29060
29060
|
* @example
|
|
29061
29061
|
* // Common setting for the skipLevelOfDetail optimization
|
|
29062
|
-
const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29063
|
-
|
|
29064
|
-
|
|
29065
|
-
|
|
29066
|
-
|
|
29067
|
-
|
|
29068
|
-
|
|
29069
|
-
|
|
29070
|
-
|
|
29071
|
-
});
|
|
29072
|
-
scene.primitives.add(tileset);
|
|
29062
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29063
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29064
|
+
* skipLevelOfDetail: true,
|
|
29065
|
+
* baseScreenSpaceError: 1024,
|
|
29066
|
+
* skipScreenSpaceErrorFactor: 16,
|
|
29067
|
+
* skipLevels: 1,
|
|
29068
|
+
* immediatelyLoadDesiredLevelOfDetail: false,
|
|
29069
|
+
* loadSiblings: false,
|
|
29070
|
+
* cullWithChildrenBounds: true
|
|
29071
|
+
* });
|
|
29072
|
+
* scene.primitives.add(tileset);
|
|
29073
29073
|
* @example
|
|
29074
29074
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
29075
|
-
const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29076
|
-
|
|
29077
|
-
|
|
29078
|
-
|
|
29079
|
-
|
|
29080
|
-
|
|
29081
|
-
});
|
|
29082
|
-
scene.primitives.add(tileset);
|
|
29075
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29076
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29077
|
+
* dynamicScreenSpaceError: true,
|
|
29078
|
+
* dynamicScreenSpaceErrorDensity: 2.0e-4,
|
|
29079
|
+
* dynamicScreenSpaceErrorFactor: 24.0,
|
|
29080
|
+
* dynamicScreenSpaceErrorHeightFalloff: 0.25
|
|
29081
|
+
* });
|
|
29082
|
+
* scene.primitives.add(tileset);
|
|
29083
29083
|
* @param options - An object describing initialization options
|
|
29084
29084
|
*/
|
|
29085
29085
|
export class Cesium3DTileset {
|
|
@@ -29110,78 +29110,78 @@ export class Cesium3DTileset {
|
|
|
29110
29110
|
preloadFlightDestinations: boolean;
|
|
29111
29111
|
/**
|
|
29112
29112
|
* Optimization option. For street-level horizon views, use lower resolution tiles far from the camera. This reduces
|
|
29113
|
-
|
|
29114
|
-
|
|
29115
|
-
|
|
29116
|
-
|
|
29113
|
+
* the amount of data loaded and improves tileset loading time with a slight drop in visual quality in the distance.
|
|
29114
|
+
* <p>
|
|
29115
|
+
* This optimization is strongest when the camera is close to the ground plane of the tileset and looking at the
|
|
29116
|
+
* horizon. Furthermore, the results are more accurate for tightly fitting bounding volumes like box and region.
|
|
29117
29117
|
*/
|
|
29118
29118
|
dynamicScreenSpaceError: boolean;
|
|
29119
29119
|
/**
|
|
29120
29120
|
* Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
|
|
29121
|
-
|
|
29122
|
-
|
|
29121
|
+
* screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
|
|
29122
|
+
* the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
|
|
29123
29123
|
*/
|
|
29124
29124
|
foveatedScreenSpaceError: boolean;
|
|
29125
29125
|
/**
|
|
29126
29126
|
* Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
29127
|
-
|
|
29127
|
+
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
29128
29128
|
*/
|
|
29129
29129
|
foveatedInterpolationCallback: Cesium3DTileset.foveatedInterpolationCallback;
|
|
29130
29130
|
/**
|
|
29131
29131
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control
|
|
29132
|
-
|
|
29133
|
-
|
|
29134
|
-
|
|
29132
|
+
* how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
|
|
29133
|
+
* This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
|
|
29134
|
+
* Setting this to 0.0 will immediately request all tiles in any given view.
|
|
29135
29135
|
*/
|
|
29136
29136
|
foveatedTimeDelay: number;
|
|
29137
29137
|
/**
|
|
29138
29138
|
* Similar to {@link Fog#density}, this option controls the camera distance at which the {@link Cesium3DTileset#dynamicScreenSpaceError}
|
|
29139
|
-
|
|
29140
|
-
|
|
29141
|
-
|
|
29142
|
-
|
|
29143
|
-
|
|
29144
|
-
|
|
29145
|
-
|
|
29146
|
-
|
|
29147
|
-
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29139
|
+
* optimization applies. Larger values will cause tiles closer to the camera to be affected. This value must be
|
|
29140
|
+
* non-negative.
|
|
29141
|
+
* <p>
|
|
29142
|
+
* This optimization works by rolling off the tile screen space error (SSE) with camera distance like a bell curve.
|
|
29143
|
+
* This has the effect of selecting lower resolution tiles far from the camera. Near the camera, no adjustment is
|
|
29144
|
+
* made. For tiles further away, the SSE is reduced by up to {@link Cesium3DTileset#dynamicScreenSpaceErrorFactor}
|
|
29145
|
+
* (measured in pixels of error).
|
|
29146
|
+
* </p>
|
|
29147
|
+
* <p>
|
|
29148
|
+
* Increasing the density makes the bell curve narrower so tiles closer to the camera are affected. This is analagous
|
|
29149
|
+
* to moving fog closer to the camera.
|
|
29150
|
+
* </p>
|
|
29151
|
+
* <p>
|
|
29152
|
+
* When the density is 0, the optimization will have no effect on the tileset.
|
|
29153
|
+
* </p>
|
|
29154
29154
|
*/
|
|
29155
29155
|
dynamicScreenSpaceErrorDensity: number;
|
|
29156
29156
|
/**
|
|
29157
29157
|
* A parameter that controls the intensity of the {@link Cesium3DTileset#dynamicScreenSpaceError} optimization for
|
|
29158
|
-
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
|
|
29163
|
-
|
|
29164
|
-
|
|
29165
|
-
|
|
29166
|
-
|
|
29167
|
-
|
|
29158
|
+
* tiles on the horizon. Larger values cause lower resolution tiles to load, improving runtime performance at a slight
|
|
29159
|
+
* reduction of visual quality. The value must be non-negative.
|
|
29160
|
+
* <p>
|
|
29161
|
+
* More specifically, this parameter represents the maximum adjustment to screen space error (SSE) in pixels for tiles
|
|
29162
|
+
* far away from the camera. See {@link Cesium3DTileset#dynamicScreenSpaceErrorDensity} for more details about how
|
|
29163
|
+
* this optimization works.
|
|
29164
|
+
* </p>
|
|
29165
|
+
* <p>
|
|
29166
|
+
* When the SSE factor is set to 0, the optimization will have no effect on the tileset.
|
|
29167
|
+
* </p>
|
|
29168
29168
|
*/
|
|
29169
29169
|
dynamicScreenSpaceErrorFactor: number;
|
|
29170
29170
|
/**
|
|
29171
29171
|
* A ratio of the tileset's height that determines "street level" for the {@link Cesium3DTileset#dynamicScreenSpaceError}
|
|
29172
|
-
|
|
29173
|
-
|
|
29174
|
-
|
|
29172
|
+
* optimization. When the camera is below this height, the dynamic screen space error optimization will have the maximum
|
|
29173
|
+
* effect, and it will roll off above this value. Valid values are between 0.0 and 1.0.
|
|
29174
|
+
* <p>
|
|
29175
29175
|
*/
|
|
29176
29176
|
dynamicScreenSpaceErrorHeightFalloff: number;
|
|
29177
29177
|
/**
|
|
29178
29178
|
* Determines whether the tileset casts or receives shadows from light sources.
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29179
|
+
* <p>
|
|
29180
|
+
* Enabling shadows has a performance impact. A tileset that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
|
|
29181
|
+
* </p>
|
|
29182
|
+
* <p>
|
|
29183
|
+
* Shadows are rendered only when {@link Viewer#shadows} is <code>true</code>.
|
|
29184
|
+
* </p>
|
|
29185
29185
|
*/
|
|
29186
29186
|
shadows: ShadowMode;
|
|
29187
29187
|
/**
|
|
@@ -29190,213 +29190,213 @@ export class Cesium3DTileset {
|
|
|
29190
29190
|
show: boolean;
|
|
29191
29191
|
/**
|
|
29192
29192
|
* Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
|
|
29193
|
-
|
|
29193
|
+
* the original feature, e.g. glTF material or per-point color in the tile.
|
|
29194
29194
|
*/
|
|
29195
29195
|
colorBlendMode: Cesium3DTileColorBlendMode;
|
|
29196
29196
|
/**
|
|
29197
29197
|
* Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is <code>MIX</code>.
|
|
29198
|
-
|
|
29199
|
-
|
|
29198
|
+
* A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
|
|
29199
|
+
* resulting in a mix of the source color and feature color.
|
|
29200
29200
|
*/
|
|
29201
29201
|
colorBlendAmount: number;
|
|
29202
29202
|
/**
|
|
29203
29203
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
29204
|
-
|
|
29205
|
-
|
|
29206
|
-
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29212
|
-
|
|
29204
|
+
* is requested, when a requested tile is finished downloading, and when a downloaded tile has been
|
|
29205
|
+
* processed and is ready to render.
|
|
29206
|
+
* <p>
|
|
29207
|
+
* The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
|
|
29208
|
+
* processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
|
|
29209
|
+
* </p>
|
|
29210
|
+
* <p>
|
|
29211
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29212
|
+
* </p>
|
|
29213
29213
|
* @example
|
|
29214
29214
|
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
29215
|
-
|
|
29216
|
-
|
|
29217
|
-
|
|
29218
|
-
|
|
29219
|
-
|
|
29220
|
-
|
|
29221
|
-
|
|
29215
|
+
* if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
29216
|
+
* console.log('Stopped loading');
|
|
29217
|
+
* return;
|
|
29218
|
+
* }
|
|
29219
|
+
*
|
|
29220
|
+
* console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
|
|
29221
|
+
* });
|
|
29222
29222
|
*/
|
|
29223
29223
|
loadProgress: Event;
|
|
29224
29224
|
/**
|
|
29225
29225
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset
|
|
29226
|
-
|
|
29227
|
-
|
|
29228
|
-
|
|
29229
|
-
|
|
29226
|
+
* is completely loaded for this view.
|
|
29227
|
+
* <p>
|
|
29228
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29229
|
+
* </p>
|
|
29230
29230
|
* @example
|
|
29231
29231
|
* tileset.allTilesLoaded.addEventListener(function() {
|
|
29232
|
-
|
|
29233
|
-
|
|
29232
|
+
* console.log('All tiles are loaded');
|
|
29233
|
+
* });
|
|
29234
29234
|
*/
|
|
29235
29235
|
allTilesLoaded: Event;
|
|
29236
29236
|
/**
|
|
29237
29237
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
29238
|
-
|
|
29239
|
-
|
|
29240
|
-
|
|
29241
|
-
|
|
29238
|
+
* is fired once when all tiles in the initial view are loaded.
|
|
29239
|
+
* <p>
|
|
29240
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29241
|
+
* </p>
|
|
29242
29242
|
* @example
|
|
29243
29243
|
* tileset.initialTilesLoaded.addEventListener(function() {
|
|
29244
|
-
|
|
29245
|
-
|
|
29244
|
+
* console.log('Initial tiles are loaded');
|
|
29245
|
+
* });
|
|
29246
29246
|
*/
|
|
29247
29247
|
initialTilesLoaded: Event;
|
|
29248
29248
|
/**
|
|
29249
29249
|
* The event fired to indicate that a tile's content was loaded.
|
|
29250
|
-
|
|
29251
|
-
|
|
29252
|
-
|
|
29253
|
-
|
|
29254
|
-
|
|
29255
|
-
|
|
29256
|
-
|
|
29257
|
-
|
|
29250
|
+
* <p>
|
|
29251
|
+
* The loaded {@link Cesium3DTile} is passed to the event listener.
|
|
29252
|
+
* </p>
|
|
29253
|
+
* <p>
|
|
29254
|
+
* This event is fired during the tileset traversal while the frame is being rendered
|
|
29255
|
+
* so that updates to the tile take effect in the same frame. Do not create or modify
|
|
29256
|
+
* Cesium entities or primitives during the event listener.
|
|
29257
|
+
* </p>
|
|
29258
29258
|
* @example
|
|
29259
29259
|
* tileset.tileLoad.addEventListener(function(tile) {
|
|
29260
|
-
|
|
29261
|
-
|
|
29260
|
+
* console.log('A tile was loaded.');
|
|
29261
|
+
* });
|
|
29262
29262
|
*/
|
|
29263
29263
|
tileLoad: Event;
|
|
29264
29264
|
/**
|
|
29265
29265
|
* The event fired to indicate that a tile's content was unloaded.
|
|
29266
|
-
|
|
29267
|
-
|
|
29268
|
-
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
|
|
29272
|
-
|
|
29273
|
-
|
|
29266
|
+
* <p>
|
|
29267
|
+
* The unloaded {@link Cesium3DTile} is passed to the event listener.
|
|
29268
|
+
* </p>
|
|
29269
|
+
* <p>
|
|
29270
|
+
* This event is fired immediately before the tile's content is unloaded while the frame is being
|
|
29271
|
+
* rendered so that the event listener has access to the tile's content. Do not create
|
|
29272
|
+
* or modify Cesium entities or primitives during the event listener.
|
|
29273
|
+
* </p>
|
|
29274
29274
|
* @example
|
|
29275
29275
|
* tileset.tileUnload.addEventListener(function(tile) {
|
|
29276
|
-
|
|
29277
|
-
|
|
29276
|
+
* console.log('A tile was unloaded from the cache.');
|
|
29277
|
+
* });
|
|
29278
29278
|
*/
|
|
29279
29279
|
tileUnload: Event;
|
|
29280
29280
|
/**
|
|
29281
29281
|
* The event fired to indicate that a tile's content failed to load.
|
|
29282
|
-
|
|
29283
|
-
|
|
29284
|
-
|
|
29285
|
-
|
|
29286
|
-
|
|
29287
|
-
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
|
|
29291
|
-
|
|
29292
|
-
|
|
29293
|
-
|
|
29282
|
+
* <p>
|
|
29283
|
+
* If there are no event listeners, error messages will be logged to the console.
|
|
29284
|
+
* </p>
|
|
29285
|
+
* <p>
|
|
29286
|
+
* The error object passed to the listener contains two properties:
|
|
29287
|
+
* <ul>
|
|
29288
|
+
* <li><code>url</code>: the url of the failed tile.</li>
|
|
29289
|
+
* <li><code>message</code>: the error message.</li>
|
|
29290
|
+
* </ul>
|
|
29291
|
+
* <p>
|
|
29292
|
+
* If multiple contents are present, this event is raised once per inner content with errors.
|
|
29293
|
+
* </p>
|
|
29294
29294
|
* @example
|
|
29295
29295
|
* tileset.tileFailed.addEventListener(function(error) {
|
|
29296
|
-
|
|
29297
|
-
|
|
29298
|
-
|
|
29296
|
+
* console.log(`An error occurred loading tile: ${error.url}`);
|
|
29297
|
+
* console.log(`Error: ${error.message}`);
|
|
29298
|
+
* });
|
|
29299
29299
|
*/
|
|
29300
29300
|
tileFailed: Event;
|
|
29301
29301
|
/**
|
|
29302
29302
|
* This event fires once for each visible tile in a frame. This can be used to manually
|
|
29303
|
-
|
|
29304
|
-
|
|
29305
|
-
|
|
29306
|
-
|
|
29307
|
-
|
|
29308
|
-
|
|
29309
|
-
|
|
29310
|
-
|
|
29311
|
-
|
|
29303
|
+
* style a tileset.
|
|
29304
|
+
* <p>
|
|
29305
|
+
* The visible {@link Cesium3DTile} is passed to the event listener.
|
|
29306
|
+
* </p>
|
|
29307
|
+
* <p>
|
|
29308
|
+
* This event is fired during the tileset traversal while the frame is being rendered
|
|
29309
|
+
* so that updates to the tile take effect in the same frame. Do not create or modify
|
|
29310
|
+
* Cesium entities or primitives during the event listener.
|
|
29311
|
+
* </p>
|
|
29312
29312
|
* @example
|
|
29313
29313
|
* tileset.tileVisible.addEventListener(function(tile) {
|
|
29314
|
-
|
|
29315
|
-
|
|
29316
|
-
|
|
29317
|
-
|
|
29314
|
+
* if (tile.content instanceof Cesium.Model3DTileContent) {
|
|
29315
|
+
* console.log('A 3D model tile is visible.');
|
|
29316
|
+
* }
|
|
29317
|
+
* });
|
|
29318
29318
|
* @example
|
|
29319
29319
|
* // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
|
|
29326
|
-
|
|
29327
|
-
|
|
29328
|
-
|
|
29329
|
-
|
|
29320
|
+
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
29321
|
+
* color : 'color("red")'
|
|
29322
|
+
* });
|
|
29323
|
+
* tileset.tileVisible.addEventListener(function(tile) {
|
|
29324
|
+
* const content = tile.content;
|
|
29325
|
+
* const featuresLength = content.featuresLength;
|
|
29326
|
+
* for (let i = 0; i < featuresLength; i+=2) {
|
|
29327
|
+
* content.getFeature(i).color = Cesium.Color.fromRandom();
|
|
29328
|
+
* }
|
|
29329
|
+
* });
|
|
29330
29330
|
*/
|
|
29331
29331
|
tileVisible: Event;
|
|
29332
29332
|
/**
|
|
29333
29333
|
* Optimization option. Determines if level of detail skipping should be applied during the traversal.
|
|
29334
|
-
|
|
29335
|
-
|
|
29336
|
-
|
|
29337
|
-
|
|
29338
|
-
|
|
29339
|
-
|
|
29334
|
+
* <p>
|
|
29335
|
+
* The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require
|
|
29336
|
+
* all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped
|
|
29337
|
+
* entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
|
|
29338
|
+
* using this optimization.
|
|
29339
|
+
* </p>
|
|
29340
29340
|
*/
|
|
29341
29341
|
skipLevelOfDetail: boolean;
|
|
29342
29342
|
/**
|
|
29343
29343
|
* The screen space error that must be reached before skipping levels of detail.
|
|
29344
|
-
|
|
29345
|
-
|
|
29346
|
-
|
|
29344
|
+
* <p>
|
|
29345
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29346
|
+
* </p>
|
|
29347
29347
|
*/
|
|
29348
29348
|
baseScreenSpaceError: number;
|
|
29349
29349
|
/**
|
|
29350
29350
|
* Multiplier defining the minimum screen space error to skip.
|
|
29351
|
-
|
|
29352
|
-
|
|
29353
|
-
|
|
29354
|
-
|
|
29355
|
-
|
|
29351
|
+
* For example, if a tile has screen space error of 100, no tiles will be loaded unless they
|
|
29352
|
+
* are leaves or have a screen space error <code><= 100 / skipScreenSpaceErrorFactor</code>.
|
|
29353
|
+
* <p>
|
|
29354
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29355
|
+
* </p>
|
|
29356
29356
|
*/
|
|
29357
29357
|
skipScreenSpaceErrorFactor: number;
|
|
29358
29358
|
/**
|
|
29359
29359
|
* Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped.
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
|
-
|
|
29363
|
-
|
|
29360
|
+
* For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.
|
|
29361
|
+
* <p>
|
|
29362
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29363
|
+
* </p>
|
|
29364
29364
|
*/
|
|
29365
29365
|
skipLevels: number;
|
|
29366
29366
|
/**
|
|
29367
29367
|
* When true, only tiles that meet the maximum screen space error will ever be downloaded.
|
|
29368
|
-
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29368
|
+
* Skipping factors are ignored and just the desired tiles are loaded.
|
|
29369
|
+
* <p>
|
|
29370
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29371
|
+
* </p>
|
|
29372
29372
|
*/
|
|
29373
29373
|
immediatelyLoadDesiredLevelOfDetail: boolean;
|
|
29374
29374
|
/**
|
|
29375
29375
|
* Determines whether siblings of visible tiles are always downloaded during traversal.
|
|
29376
|
-
|
|
29377
|
-
|
|
29378
|
-
|
|
29379
|
-
|
|
29376
|
+
* This may be useful for ensuring that tiles are already available when the viewer turns left/right.
|
|
29377
|
+
* <p>
|
|
29378
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29379
|
+
* </p>
|
|
29380
29380
|
*/
|
|
29381
29381
|
loadSiblings: boolean;
|
|
29382
29382
|
/**
|
|
29383
29383
|
* The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29384
|
+
* <p>
|
|
29385
|
+
* For example, disabling additional light sources by setting
|
|
29386
|
+
* <code>tileset.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code>
|
|
29387
|
+
* will make the tileset much darker. Here, increasing the intensity of the light source will make the tileset brighter.
|
|
29388
|
+
* </p>
|
|
29389
29389
|
*/
|
|
29390
29390
|
lightColor: Cartesian3;
|
|
29391
29391
|
/**
|
|
29392
29392
|
* Whether to cull back-facing geometry. When true, back face culling is determined
|
|
29393
|
-
|
|
29393
|
+
* by the glTF material's doubleSided property; when false, back face culling is disabled.
|
|
29394
29394
|
*/
|
|
29395
29395
|
backFaceCulling: boolean;
|
|
29396
29396
|
/**
|
|
29397
29397
|
* Whether to display the outline for models using the
|
|
29398
|
-
|
|
29399
|
-
|
|
29398
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
|
|
29399
|
+
* When true, outlines are displayed. When false, outlines are not displayed.
|
|
29400
29400
|
*/
|
|
29401
29401
|
showOutline: boolean;
|
|
29402
29402
|
/**
|
|
@@ -29413,79 +29413,79 @@ export class Cesium3DTileset {
|
|
|
29413
29413
|
enableCollision: boolean;
|
|
29414
29414
|
/**
|
|
29415
29415
|
* This property is for debugging only; it is not optimized for production use.
|
|
29416
|
-
|
|
29417
|
-
|
|
29418
|
-
|
|
29419
|
-
|
|
29420
|
-
|
|
29416
|
+
* <p>
|
|
29417
|
+
* Determines if only the tiles from last frame should be used for rendering. This
|
|
29418
|
+
* effectively "freezes" the tileset to the previous frame so it is possible to zoom
|
|
29419
|
+
* out and see what was rendered.
|
|
29420
|
+
* </p>
|
|
29421
29421
|
*/
|
|
29422
29422
|
debugFreezeFrame: boolean;
|
|
29423
29423
|
/**
|
|
29424
29424
|
* This property is for debugging only; it is not optimized for production use.
|
|
29425
|
-
|
|
29426
|
-
|
|
29427
|
-
|
|
29428
|
-
|
|
29429
|
-
|
|
29425
|
+
* <p>
|
|
29426
|
+
* When true, assigns a random color to each tile. This is useful for visualizing
|
|
29427
|
+
* what features belong to what tiles, especially with additive refinement where features
|
|
29428
|
+
* from parent tiles may be interleaved with features from child tiles.
|
|
29429
|
+
* </p>
|
|
29430
29430
|
*/
|
|
29431
29431
|
debugColorizeTiles: boolean;
|
|
29432
29432
|
/**
|
|
29433
29433
|
* This property is for debugging only; it is not optimized for production use.
|
|
29434
|
-
|
|
29435
|
-
|
|
29436
|
-
|
|
29434
|
+
* <p>
|
|
29435
|
+
* When true, renders each tile's content as a wireframe.
|
|
29436
|
+
* </p>
|
|
29437
29437
|
*/
|
|
29438
29438
|
debugWireframe: boolean;
|
|
29439
29439
|
/**
|
|
29440
29440
|
* This property is for debugging only; it is not optimized for production use.
|
|
29441
|
-
|
|
29442
|
-
|
|
29443
|
-
|
|
29444
|
-
|
|
29445
|
-
|
|
29441
|
+
* <p>
|
|
29442
|
+
* When true, renders the bounding volume for each visible tile. The bounding volume is
|
|
29443
|
+
* white if the tile has a content bounding volume or is empty; otherwise, it is red. Tiles that don't meet the
|
|
29444
|
+
* screen space error and are still refining to their descendants are yellow.
|
|
29445
|
+
* </p>
|
|
29446
29446
|
*/
|
|
29447
29447
|
debugShowBoundingVolume: boolean;
|
|
29448
29448
|
/**
|
|
29449
29449
|
* This property is for debugging only; it is not optimized for production use.
|
|
29450
|
-
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29450
|
+
* <p>
|
|
29451
|
+
* When true, renders the bounding volume for each visible tile's content. The bounding volume is
|
|
29452
|
+
* blue if the tile has a content bounding volume; otherwise it is red.
|
|
29453
|
+
* </p>
|
|
29454
29454
|
*/
|
|
29455
29455
|
debugShowContentBoundingVolume: boolean;
|
|
29456
29456
|
/**
|
|
29457
29457
|
* This property is for debugging only; it is not optimized for production use.
|
|
29458
|
-
|
|
29459
|
-
|
|
29460
|
-
|
|
29458
|
+
* <p>
|
|
29459
|
+
* When true, renders the viewer request volume for each tile.
|
|
29460
|
+
* </p>
|
|
29461
29461
|
*/
|
|
29462
29462
|
debugShowViewerRequestVolume: boolean;
|
|
29463
29463
|
/**
|
|
29464
29464
|
* This property is for debugging only; it is not optimized for production use.
|
|
29465
|
-
|
|
29466
|
-
|
|
29467
|
-
|
|
29465
|
+
* <p>
|
|
29466
|
+
* When true, draws labels to indicate the geometric error of each tile.
|
|
29467
|
+
* </p>
|
|
29468
29468
|
*/
|
|
29469
29469
|
debugShowGeometricError: boolean;
|
|
29470
29470
|
/**
|
|
29471
29471
|
* This property is for debugging only; it is not optimized for production use.
|
|
29472
|
-
|
|
29473
|
-
|
|
29474
|
-
|
|
29472
|
+
* <p>
|
|
29473
|
+
* When true, draws labels to indicate the number of commands, points, triangles and features of each tile.
|
|
29474
|
+
* </p>
|
|
29475
29475
|
*/
|
|
29476
29476
|
debugShowRenderingStatistics: boolean;
|
|
29477
29477
|
/**
|
|
29478
29478
|
* This property is for debugging only; it is not optimized for production use.
|
|
29479
|
-
|
|
29480
|
-
|
|
29481
|
-
|
|
29479
|
+
* <p>
|
|
29480
|
+
* When true, draws labels to indicate the geometry and texture memory usage of each tile.
|
|
29481
|
+
* </p>
|
|
29482
29482
|
*/
|
|
29483
29483
|
debugShowMemoryUsage: boolean;
|
|
29484
29484
|
/**
|
|
29485
29485
|
* This property is for debugging only; it is not optimized for production use.
|
|
29486
|
-
|
|
29487
|
-
|
|
29488
|
-
|
|
29486
|
+
* <p>
|
|
29487
|
+
* When true, draws labels to indicate the url of each tile.
|
|
29488
|
+
* </p>
|
|
29489
29489
|
*/
|
|
29490
29490
|
debugShowUrl: boolean;
|
|
29491
29491
|
/**
|
|
@@ -29494,36 +29494,36 @@ export class Cesium3DTileset {
|
|
|
29494
29494
|
examineVectorLinesFunction: (...params: any[]) => any;
|
|
29495
29495
|
/**
|
|
29496
29496
|
* This property is for debugging only; it is not optimized for production use.
|
|
29497
|
-
|
|
29498
|
-
|
|
29499
|
-
|
|
29500
|
-
|
|
29501
|
-
|
|
29497
|
+
* <p>
|
|
29498
|
+
* The line width to use when rendering the tileset in wireframe mode.
|
|
29499
|
+
* This only applies when <code>debugWireframeMode</code> is set to "barycentric".
|
|
29500
|
+
* For "lines" mode, the line width is limited by the browser's WebGL implementation.
|
|
29501
|
+
* </p>
|
|
29502
29502
|
*/
|
|
29503
29503
|
debugWireframeLineWidth: number;
|
|
29504
29504
|
/**
|
|
29505
29505
|
* This property is for debugging only; it is not optimized for production use.
|
|
29506
|
-
|
|
29507
|
-
|
|
29508
|
-
|
|
29506
|
+
* <p>
|
|
29507
|
+
* The mode to use when rendering the tileset in wireframe mode.
|
|
29508
|
+
* </p>
|
|
29509
29509
|
*/
|
|
29510
29510
|
debugWireframeMode: "lines" | "barycentric";
|
|
29511
29511
|
/**
|
|
29512
29512
|
* This property is for debugging only; it is not optimized for production use.
|
|
29513
|
-
|
|
29514
|
-
|
|
29515
|
-
|
|
29516
|
-
|
|
29517
|
-
|
|
29518
|
-
|
|
29513
|
+
* <p>
|
|
29514
|
+
* When <code>true</code>, the wireframe color is overlaid on top of the tileset's
|
|
29515
|
+
* original material. When <code>false</code>, the wireframe color replaces the
|
|
29516
|
+
* tileset's original material entirely. Only applies when <code>debugWireframeMode</code>
|
|
29517
|
+
* is set to "barycentric".
|
|
29518
|
+
* </p>
|
|
29519
29519
|
*/
|
|
29520
29520
|
debugWireframeOverlay: boolean;
|
|
29521
29521
|
/**
|
|
29522
29522
|
* Gets the tileset's asset object property, which contains metadata about the tileset.
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29523
|
+
* <p>
|
|
29524
|
+
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-asset|asset schema reference}
|
|
29525
|
+
* in the 3D Tiles spec for the full set of properties.
|
|
29526
|
+
* </p>
|
|
29527
29527
|
*/
|
|
29528
29528
|
readonly asset: any;
|
|
29529
29529
|
/**
|
|
@@ -29540,32 +29540,32 @@ export class Cesium3DTileset {
|
|
|
29540
29540
|
clippingPolygons: ClippingPolygonCollection;
|
|
29541
29541
|
/**
|
|
29542
29542
|
* The collection of <code>ImageryLayer</code> objects providing 2D georeferenced
|
|
29543
|
-
|
|
29544
|
-
|
|
29545
|
-
|
|
29543
|
+
* image data that will be rendered over the tileset.
|
|
29544
|
+
*
|
|
29545
|
+
* The imagery will be draped over glTF, B3DM, PNTS, or GeoJSON tile content.
|
|
29546
29546
|
* @example
|
|
29547
29547
|
* // Drape Bing Maps Aerial imagery over the tileset
|
|
29548
|
-
|
|
29549
|
-
|
|
29550
|
-
|
|
29551
|
-
|
|
29552
|
-
|
|
29548
|
+
* const imageryProvider = await Cesium.createWorldImageryAsync({
|
|
29549
|
+
* style: Cesium.IonWorldImageryStyle.AERIAL,
|
|
29550
|
+
* });
|
|
29551
|
+
* const imageryLayer = new ImageryLayer(imageryProvider);
|
|
29552
|
+
* tileset.imageryLayers.add(imageryLayer);
|
|
29553
29553
|
*/
|
|
29554
29554
|
readonly imageryLayers: ImageryLayerCollection;
|
|
29555
29555
|
/**
|
|
29556
29556
|
* Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29557
|
+
* <p>
|
|
29558
|
+
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification#reference-properties|properties schema reference}
|
|
29559
|
+
* in the 3D Tiles spec for the full set of properties.
|
|
29560
|
+
* </p>
|
|
29561
29561
|
* @example
|
|
29562
29562
|
* console.log(`Maximum building height: ${tileset.properties.height.maximum}`);
|
|
29563
|
-
|
|
29563
|
+
* console.log(`Minimum building height: ${tileset.properties.height.minimum}`);
|
|
29564
29564
|
*/
|
|
29565
29565
|
readonly properties: any;
|
|
29566
29566
|
/**
|
|
29567
29567
|
* When <code>true</code>, all tiles that meet the screen space error this frame are loaded. The tileset is
|
|
29568
|
-
|
|
29568
|
+
* completely loaded for this view.
|
|
29569
29569
|
*/
|
|
29570
29570
|
readonly tilesLoaded: boolean;
|
|
29571
29571
|
/**
|
|
@@ -29578,93 +29578,93 @@ export class Cesium3DTileset {
|
|
|
29578
29578
|
readonly basePath: string;
|
|
29579
29579
|
/**
|
|
29580
29580
|
* The style, defined using the
|
|
29581
|
-
|
|
29582
|
-
|
|
29583
|
-
|
|
29584
|
-
|
|
29585
|
-
|
|
29586
|
-
|
|
29587
|
-
|
|
29588
|
-
|
|
29589
|
-
|
|
29590
|
-
|
|
29591
|
-
|
|
29592
|
-
|
|
29593
|
-
|
|
29594
|
-
|
|
29595
|
-
|
|
29596
|
-
|
|
29597
|
-
|
|
29598
|
-
|
|
29599
|
-
|
|
29581
|
+
* {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Styling|3D Tiles Styling language},
|
|
29582
|
+
* applied to each feature in the tileset.
|
|
29583
|
+
* <p>
|
|
29584
|
+
* Assign <code>undefined</code> to remove the style, which will restore the visual
|
|
29585
|
+
* appearance of the tileset to its default when no style was applied.
|
|
29586
|
+
* </p>
|
|
29587
|
+
* <p>
|
|
29588
|
+
* The style is applied to a tile before the {@link Cesium3DTileset#tileVisible}
|
|
29589
|
+
* event is raised, so code in <code>tileVisible</code> can manually set a feature's
|
|
29590
|
+
* properties (e.g. color and show) after the style is applied. When
|
|
29591
|
+
* a new style is assigned any manually set properties are overwritten.
|
|
29592
|
+
* </p>
|
|
29593
|
+
* <p>
|
|
29594
|
+
* Use an always "true" condition to specify the Color for all objects that are not
|
|
29595
|
+
* overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White
|
|
29596
|
+
* will be used. Similarly, use an always "true" condition to specify the show property
|
|
29597
|
+
* for all objects that are not overridden by pre-existing conditions. Otherwise, the
|
|
29598
|
+
* default show value true will be used.
|
|
29599
|
+
* </p>
|
|
29600
29600
|
* @example
|
|
29601
29601
|
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
29608
|
-
|
|
29609
|
-
|
|
29610
|
-
|
|
29611
|
-
|
|
29612
|
-
|
|
29613
|
-
|
|
29602
|
+
* color : {
|
|
29603
|
+
* conditions : [
|
|
29604
|
+
* ['${Height} >= 100', 'color("purple", 0.5)'],
|
|
29605
|
+
* ['${Height} >= 50', 'color("red")'],
|
|
29606
|
+
* ['true', 'color("blue")']
|
|
29607
|
+
* ]
|
|
29608
|
+
* },
|
|
29609
|
+
* show : '${Height} > 0',
|
|
29610
|
+
* meta : {
|
|
29611
|
+
* description : '"Building id ${id} has height ${Height}."'
|
|
29612
|
+
* }
|
|
29613
|
+
* });
|
|
29614
29614
|
*/
|
|
29615
29615
|
style: Cesium3DTileStyle | undefined;
|
|
29616
29616
|
/**
|
|
29617
29617
|
* A custom shader to apply to all tiles in the tileset. Only used for
|
|
29618
|
-
|
|
29619
|
-
|
|
29618
|
+
* contents that use {@link Model}. Using custom shaders with a
|
|
29619
|
+
* {@link Cesium3DTileStyle} may lead to undefined behavior.
|
|
29620
29620
|
*/
|
|
29621
29621
|
customShader: CustomShader | undefined;
|
|
29622
29622
|
/**
|
|
29623
29623
|
* The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
29630
|
-
|
|
29631
|
-
|
|
29632
|
-
|
|
29633
|
-
|
|
29624
|
+
* refines to its descendants, and therefore plays a major role in balancing performance with visual quality.
|
|
29625
|
+
* <p>
|
|
29626
|
+
* A tile's screen space error is roughly equivalent to the number of pixels wide that would be drawn if a sphere with a
|
|
29627
|
+
* radius equal to the tile's <b>geometric error</b> were rendered at the tile's position. If this value exceeds
|
|
29628
|
+
* <code>maximumScreenSpaceError</code> the tile refines to its descendants.
|
|
29629
|
+
* </p>
|
|
29630
|
+
* <p>
|
|
29631
|
+
* Depending on the tileset, <code>maximumScreenSpaceError</code> may need to be tweaked to achieve the right balance.
|
|
29632
|
+
* Higher values provide better performance but lower visual quality.
|
|
29633
|
+
* </p>
|
|
29634
29634
|
*/
|
|
29635
29635
|
maximumScreenSpaceError: number;
|
|
29636
29636
|
/**
|
|
29637
29637
|
* The amount of GPU memory (in bytes) used to cache tiles. This memory usage is estimated from
|
|
29638
|
-
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
|
|
29642
|
-
|
|
29643
|
-
|
|
29644
|
-
|
|
29645
|
-
|
|
29646
|
-
|
|
29647
|
-
|
|
29648
|
-
|
|
29649
|
-
|
|
29650
|
-
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
|
|
29655
|
-
|
|
29638
|
+
* geometry, textures, and batch table textures of loaded tiles. For point clouds, this value also
|
|
29639
|
+
* includes per-point metadata.
|
|
29640
|
+
* <p>
|
|
29641
|
+
* Tiles not in view are unloaded to enforce this.
|
|
29642
|
+
* </p>
|
|
29643
|
+
* <p>
|
|
29644
|
+
* If decreasing this value results in unloading tiles, the tiles are unloaded the next frame.
|
|
29645
|
+
* </p>
|
|
29646
|
+
* <p>
|
|
29647
|
+
* If tiles sized more than <code>cacheBytes</code> are needed to meet the
|
|
29648
|
+
* desired screen space error, determined by {@link Cesium3DTileset#maximumScreenSpaceError},
|
|
29649
|
+
* for the current view, then the memory usage of the tiles loaded will exceed
|
|
29650
|
+
* <code>cacheBytes</code> by up to <code>maximumCacheOverflowBytes</code>.
|
|
29651
|
+
* For example, if <code>cacheBytes</code> is 500000, but 600000 bytes
|
|
29652
|
+
* of tiles are needed to meet the screen space error, then 600000 bytes of tiles
|
|
29653
|
+
* may be loaded (if <code>maximumCacheOverflowBytes</code> is at least 100000).
|
|
29654
|
+
* When these tiles go out of view, they will be unloaded.
|
|
29655
|
+
* </p>
|
|
29656
29656
|
*/
|
|
29657
29657
|
cacheBytes: number;
|
|
29658
29658
|
/**
|
|
29659
29659
|
* The maximum additional amount of GPU memory (in bytes) that will be used to cache tiles.
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29667
|
-
|
|
29660
|
+
* <p>
|
|
29661
|
+
* If tiles sized more than <code>cacheBytes</code> plus <code>maximumCacheOverflowBytes</code>
|
|
29662
|
+
* are needed to meet the desired screen space error, determined by
|
|
29663
|
+
* {@link Cesium3DTileset#maximumScreenSpaceError} for the current view, then
|
|
29664
|
+
* {@link Cesium3DTileset#memoryAdjustedScreenSpaceError} will be adjusted
|
|
29665
|
+
* until the tiles required to meet the adjusted screen space error use less
|
|
29666
|
+
* than <code>cacheBytes</code> plus <code>maximumCacheOverflowBytes</code>.
|
|
29667
|
+
* </p>
|
|
29668
29668
|
*/
|
|
29669
29669
|
maximumCacheOverflowBytes: number;
|
|
29670
29670
|
/**
|
|
@@ -29679,24 +29679,24 @@ export class Cesium3DTileset {
|
|
|
29679
29679
|
* The tileset's bounding sphere.
|
|
29680
29680
|
* @example
|
|
29681
29681
|
* const tileset = await Cesium.Cesium3DTileset.fromUrl("http://localhost:8002/tilesets/Seattle/tileset.json");
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29682
|
+
*
|
|
29683
|
+
* viewer.scene.primitives.add(tileset);
|
|
29684
|
+
*
|
|
29685
|
+
* // Set the camera to view the newly added tileset
|
|
29686
|
+
* viewer.camera.viewBoundingSphere(tileset.boundingSphere, new Cesium.HeadingPitchRange(0, -0.5, 0));
|
|
29687
29687
|
*/
|
|
29688
29688
|
readonly boundingSphere: BoundingSphere;
|
|
29689
29689
|
/**
|
|
29690
29690
|
* A 4x4 transformation matrix that transforms the entire tileset.
|
|
29691
29691
|
* @example
|
|
29692
29692
|
* // Adjust a tileset's height from the globe's surface.
|
|
29693
|
-
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29693
|
+
* const heightOffset = 20.0;
|
|
29694
|
+
* const boundingSphere = tileset.boundingSphere;
|
|
29695
|
+
* const cartographic = Cesium.Cartographic.fromCartesian(boundingSphere.center);
|
|
29696
|
+
* const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 0.0);
|
|
29697
|
+
* const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, heightOffset);
|
|
29698
|
+
* const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3());
|
|
29699
|
+
* tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
|
|
29700
29700
|
*/
|
|
29701
29701
|
modelMatrix: Matrix4;
|
|
29702
29702
|
/**
|
|
@@ -29705,45 +29705,45 @@ export class Cesium3DTileset {
|
|
|
29705
29705
|
readonly timeSinceLoad: number;
|
|
29706
29706
|
/**
|
|
29707
29707
|
* The total amount of GPU memory in bytes used by the tileset. This value is estimated from
|
|
29708
|
-
|
|
29708
|
+
* geometry, texture, batch table textures, and binary metadata of loaded tiles.
|
|
29709
29709
|
*/
|
|
29710
29710
|
readonly totalMemoryUsageInBytes: number;
|
|
29711
29711
|
/**
|
|
29712
29712
|
* Determines whether terrain, 3D Tiles, or both will be classified by this tileset.
|
|
29713
|
-
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
29721
|
-
|
|
29722
|
-
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
29726
|
-
|
|
29727
|
-
|
|
29728
|
-
|
|
29729
|
-
|
|
29730
|
-
|
|
29731
|
-
|
|
29732
|
-
|
|
29733
|
-
|
|
29734
|
-
|
|
29735
|
-
|
|
29736
|
-
|
|
29737
|
-
|
|
29738
|
-
|
|
29713
|
+
* <p>
|
|
29714
|
+
* This option is only applied to tilesets containing batched 3D models,
|
|
29715
|
+
* glTF content, geometry data, or vector data. Even when undefined, vector
|
|
29716
|
+
* and geometry data must render as classifications and will default to
|
|
29717
|
+
* rendering on both terrain and other 3D Tiles tilesets.
|
|
29718
|
+
* </p>
|
|
29719
|
+
* <p>
|
|
29720
|
+
* When enabled for batched 3D model and glTF tilesets, there are a few
|
|
29721
|
+
* requirements/limitations on the glTF:
|
|
29722
|
+
* <ul>
|
|
29723
|
+
* <li>The glTF cannot contain morph targets, skins, or animations.</li>
|
|
29724
|
+
* <li>The glTF cannot contain the <code>EXT_mesh_gpu_instancing</code> extension.</li>
|
|
29725
|
+
* <li>Only meshes with TRIANGLES can be used to classify other assets.</li>
|
|
29726
|
+
* <li>The meshes must be watertight.</li>
|
|
29727
|
+
* <li>The <code>POSITION</code> semantic is required.</li>
|
|
29728
|
+
* <li>If <code>_BATCHID</code>s and an index buffer are both present, all indices with the same batch id must occupy contiguous sections of the index buffer.</li>
|
|
29729
|
+
* <li>If <code>_BATCHID</code>s are present with no index buffer, all positions with the same batch id must occupy contiguous sections of the position buffer.</li>
|
|
29730
|
+
* </ul>
|
|
29731
|
+
* </p>
|
|
29732
|
+
* <p>
|
|
29733
|
+
* Additionally, classification is not supported for points or instanced 3D
|
|
29734
|
+
* models.
|
|
29735
|
+
* </p>
|
|
29736
|
+
* <p>
|
|
29737
|
+
* The 3D Tiles or terrain receiving the classification must be opaque.
|
|
29738
|
+
* </p>
|
|
29739
29739
|
*/
|
|
29740
29740
|
readonly classificationType: ClassificationType;
|
|
29741
29741
|
/**
|
|
29742
29742
|
* Specifies if the height is relative to terrain, 3D Tiles, or both.
|
|
29743
|
-
|
|
29744
|
-
|
|
29745
|
-
|
|
29746
|
-
|
|
29743
|
+
* <p>
|
|
29744
|
+
* This option is only applied to point features in tilesets containing vector data.
|
|
29745
|
+
* This option requires the Viewer's scene to be passed in through options.scene.
|
|
29746
|
+
* </p>
|
|
29747
29747
|
*/
|
|
29748
29748
|
readonly heightReference: HeightReference | undefined;
|
|
29749
29749
|
/**
|
|
@@ -29752,18 +29752,18 @@ export class Cesium3DTileset {
|
|
|
29752
29752
|
readonly ellipsoid: Ellipsoid;
|
|
29753
29753
|
/**
|
|
29754
29754
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
|
|
29755
|
-
|
|
29756
|
-
|
|
29755
|
+
* Tiles that are inside this cone are loaded immediately. Tiles outside the cone are potentially deferred based on how far outside the cone they are and {@link Cesium3DTileset#foveatedInterpolationCallback} and {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation}.
|
|
29756
|
+
* Setting this to 0.0 means the cone will be the line formed by the camera position and its view direction. Setting this to 1.0 means the cone encompasses the entire field of view of the camera, essentially disabling the effect.
|
|
29757
29757
|
*/
|
|
29758
29758
|
foveatedConeSize: number;
|
|
29759
29759
|
/**
|
|
29760
29760
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
|
|
29761
|
-
|
|
29761
|
+
* The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
|
|
29762
29762
|
*/
|
|
29763
29763
|
foveatedMinimumScreenSpaceErrorRelaxation: number;
|
|
29764
29764
|
/**
|
|
29765
29765
|
* Returns the <code>extras</code> property at the top-level of the tileset JSON, which contains application specific metadata.
|
|
29766
|
-
|
|
29766
|
+
* Returns <code>undefined</code> if <code>extras</code> does not exist.
|
|
29767
29767
|
*/
|
|
29768
29768
|
readonly extras: any;
|
|
29769
29769
|
/**
|
|
@@ -29774,8 +29774,8 @@ export class Cesium3DTileset {
|
|
|
29774
29774
|
* The properties for managing dynamic environment maps on this model. Affects lighting.
|
|
29775
29775
|
* @example
|
|
29776
29776
|
* // Change the ground color used for a tileset's environment map to a forest green
|
|
29777
|
-
|
|
29778
|
-
|
|
29777
|
+
* const environmentMapManager = tileset.environmentMapManager;
|
|
29778
|
+
* environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
|
|
29779
29779
|
*/
|
|
29780
29780
|
readonly environmentMapManager: DynamicEnvironmentMapManager;
|
|
29781
29781
|
/**
|
|
@@ -29784,7 +29784,7 @@ export class Cesium3DTileset {
|
|
|
29784
29784
|
vectorClassificationOnly: boolean;
|
|
29785
29785
|
/**
|
|
29786
29786
|
* Whether vector tiles should keep decoded positions in memory.
|
|
29787
|
-
|
|
29787
|
+
* This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
|
|
29788
29788
|
*/
|
|
29789
29789
|
vectorKeepDecodedPositions: boolean;
|
|
29790
29790
|
/**
|
|
@@ -29793,106 +29793,106 @@ export class Cesium3DTileset {
|
|
|
29793
29793
|
showCreditsOnScreen: boolean;
|
|
29794
29794
|
/**
|
|
29795
29795
|
* Label of the feature ID set to use for picking and styling.
|
|
29796
|
-
|
|
29797
|
-
|
|
29798
|
-
|
|
29799
|
-
|
|
29800
|
-
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
|
|
29807
|
-
|
|
29808
|
-
|
|
29809
|
-
|
|
29796
|
+
* <p>
|
|
29797
|
+
* For EXT_mesh_features, this is the feature ID's label property, or
|
|
29798
|
+
* "featureId_N" (where N is the index in the featureIds array) when not
|
|
29799
|
+
* specified. EXT_feature_metadata did not have a label field, so such
|
|
29800
|
+
* feature ID sets are always labeled "featureId_N" where N is the index in
|
|
29801
|
+
* the list of all feature Ids, where feature ID attributes are listed before
|
|
29802
|
+
* feature ID textures.
|
|
29803
|
+
* </p>
|
|
29804
|
+
* <p>
|
|
29805
|
+
* If featureIdLabel is set to an integer N, it is converted to
|
|
29806
|
+
* the string "featureId_N" automatically. If both per-primitive and
|
|
29807
|
+
* per-instance feature IDs are present, the instance feature IDs take
|
|
29808
|
+
* priority.
|
|
29809
|
+
* </p>
|
|
29810
29810
|
*/
|
|
29811
29811
|
featureIdLabel: string;
|
|
29812
29812
|
/**
|
|
29813
29813
|
* Label of the instance feature ID set used for picking and styling.
|
|
29814
|
-
|
|
29815
|
-
|
|
29816
|
-
|
|
29817
|
-
|
|
29818
|
-
|
|
29819
|
-
|
|
29814
|
+
* <p>
|
|
29815
|
+
* If instanceFeatureIdLabel is set to an integer N, it is converted to
|
|
29816
|
+
* the string "instanceFeatureId_N" automatically.
|
|
29817
|
+
* If both per-primitive and per-instance feature IDs are present, the
|
|
29818
|
+
* instance feature IDs take priority.
|
|
29819
|
+
* </p>
|
|
29820
29820
|
*/
|
|
29821
29821
|
instanceFeatureIdLabel: string;
|
|
29822
29822
|
/**
|
|
29823
29823
|
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29824
|
-
|
|
29824
|
+
* used for streaming massive heterogeneous 3D geospatial datasets, from a Cesium ion asset ID.
|
|
29825
29825
|
* @example
|
|
29826
29826
|
* // Load a Cesium3DTileset with a Cesium ion asset ID of 124624234
|
|
29827
|
-
|
|
29828
|
-
|
|
29829
|
-
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
29827
|
+
* try {
|
|
29828
|
+
* const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
|
|
29829
|
+
* scene.primitives.add(tileset);
|
|
29830
|
+
* } catch (error) {
|
|
29831
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29832
|
+
* }
|
|
29833
29833
|
* @param assetId - The Cesium ion asset id.
|
|
29834
29834
|
* @param [options] - An object describing initialization options
|
|
29835
29835
|
*/
|
|
29836
29836
|
static fromIonAssetId(assetId: number, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset>;
|
|
29837
29837
|
/**
|
|
29838
29838
|
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29839
|
-
|
|
29839
|
+
* used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29840
29840
|
* @example
|
|
29841
29841
|
* try {
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29845
|
-
|
|
29846
|
-
|
|
29847
|
-
|
|
29848
|
-
|
|
29842
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29843
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json"
|
|
29844
|
+
* );
|
|
29845
|
+
* scene.primitives.add(tileset);
|
|
29846
|
+
* } catch (error) {
|
|
29847
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29848
|
+
* }
|
|
29849
29849
|
* @example
|
|
29850
29850
|
* // Common setting for the skipLevelOfDetail optimization
|
|
29851
|
-
|
|
29852
|
-
|
|
29853
|
-
|
|
29854
|
-
|
|
29855
|
-
|
|
29856
|
-
|
|
29857
|
-
|
|
29858
|
-
|
|
29859
|
-
|
|
29860
|
-
|
|
29861
|
-
|
|
29851
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29852
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29853
|
+
* skipLevelOfDetail: true,
|
|
29854
|
+
* baseScreenSpaceError: 1024,
|
|
29855
|
+
* skipScreenSpaceErrorFactor: 16,
|
|
29856
|
+
* skipLevels: 1,
|
|
29857
|
+
* immediatelyLoadDesiredLevelOfDetail: false,
|
|
29858
|
+
* loadSiblings: false,
|
|
29859
|
+
* cullWithChildrenBounds: true
|
|
29860
|
+
* });
|
|
29861
|
+
* scene.primitives.add(tileset);
|
|
29862
29862
|
* @example
|
|
29863
29863
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
|
|
29870
|
-
|
|
29871
|
-
|
|
29864
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29865
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29866
|
+
* dynamicScreenSpaceError: true,
|
|
29867
|
+
* dynamicScreenSpaceErrorDensity: 2.0e-4,
|
|
29868
|
+
* dynamicScreenSpaceErrorFactor: 24.0,
|
|
29869
|
+
* dynamicScreenSpaceErrorHeightFalloff: 0.25
|
|
29870
|
+
* });
|
|
29871
|
+
* scene.primitives.add(tileset);
|
|
29872
29872
|
* @param url - The url to a tileset JSON file.
|
|
29873
29873
|
* @param [options] - An object describing initialization options
|
|
29874
29874
|
*/
|
|
29875
29875
|
static fromUrl(url: Resource | string, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset>;
|
|
29876
29876
|
/**
|
|
29877
29877
|
* Provides a hook to override the method used to request the tileset json
|
|
29878
|
-
|
|
29878
|
+
* useful when fetching tilesets from remote servers
|
|
29879
29879
|
* @param tilesetUrl - The url of the json file to be fetched
|
|
29880
29880
|
* @returns A promise that resolves with the fetched json data
|
|
29881
29881
|
*/
|
|
29882
29882
|
static loadJson(tilesetUrl: Resource | string): Promise<object>;
|
|
29883
29883
|
/**
|
|
29884
29884
|
* Marks the tileset's {@link Cesium3DTileset#style} as dirty, which forces all
|
|
29885
|
-
|
|
29885
|
+
* features to re-evaluate the style in the next frame each is visible.
|
|
29886
29886
|
*/
|
|
29887
29887
|
makeStyleDirty(): void;
|
|
29888
29888
|
/**
|
|
29889
29889
|
* Unloads all tiles that weren't selected the previous frame. This can be used to
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
|
|
29895
|
-
|
|
29890
|
+
* explicitly manage the tile cache and reduce the total number of tiles loaded below
|
|
29891
|
+
* {@link Cesium3DTileset#cacheBytes}.
|
|
29892
|
+
* <p>
|
|
29893
|
+
* Tile unloads occur at the next frame to keep all the WebGL delete calls
|
|
29894
|
+
* within the render loop.
|
|
29895
|
+
* </p>
|
|
29896
29896
|
*/
|
|
29897
29897
|
trimLoadedTiles(): void;
|
|
29898
29898
|
/**
|
|
@@ -29903,19 +29903,19 @@ export class Cesium3DTileset {
|
|
|
29903
29903
|
hasExtension(extensionName: string): boolean;
|
|
29904
29904
|
/**
|
|
29905
29905
|
* Returns true if this object was destroyed; otherwise, false.
|
|
29906
|
-
|
|
29907
|
-
|
|
29908
|
-
|
|
29906
|
+
* <br /><br />
|
|
29907
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
29908
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
29909
29909
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
29910
29910
|
*/
|
|
29911
29911
|
isDestroyed(): boolean;
|
|
29912
29912
|
/**
|
|
29913
29913
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
29914
|
-
|
|
29915
|
-
|
|
29916
|
-
|
|
29917
|
-
|
|
29918
|
-
|
|
29914
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
29915
|
+
* <br /><br />
|
|
29916
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
29917
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
29918
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
29919
29919
|
* @example
|
|
29920
29920
|
* tileset = tileset && tileset.destroy();
|
|
29921
29921
|
*/
|
|
@@ -29924,9 +29924,9 @@ export class Cesium3DTileset {
|
|
|
29924
29924
|
* Get the height of the loaded surface at a given cartographic. This function will only take into account meshes for loaded tiles, not neccisarily the most detailed tiles available for a tileset. This function will always return undefined when sampling a point cloud.
|
|
29925
29925
|
* @example
|
|
29926
29926
|
* const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
|
|
29927
|
-
|
|
29928
|
-
|
|
29929
|
-
|
|
29927
|
+
* scene.primitives.add(tileset);
|
|
29928
|
+
*
|
|
29929
|
+
* const height = tileset.getHeight(scene.camera.positionCartographic, scene);
|
|
29930
29930
|
* @param cartographic - The cartographic for which to find the height.
|
|
29931
29931
|
* @param scene - The scene where visualization is taking place.
|
|
29932
29932
|
* @returns The height of the cartographic or undefined if it could not be found.
|
|
@@ -29934,54 +29934,58 @@ export class Cesium3DTileset {
|
|
|
29934
29934
|
getHeight(cartographic: Cartographic, scene: Scene): number | undefined;
|
|
29935
29935
|
/**
|
|
29936
29936
|
* Displays the tileset in wireframe mode.
|
|
29937
|
-
|
|
29938
|
-
|
|
29939
|
-
|
|
29940
|
-
|
|
29941
|
-
|
|
29942
|
-
|
|
29943
|
-
|
|
29944
|
-
|
|
29937
|
+
* <p>
|
|
29938
|
+
* Only affects this tileset; other tilesets in the scene remain unchanged.
|
|
29939
|
+
* </p>
|
|
29940
|
+
* <p>
|
|
29941
|
+
* For WebGL1 environments using "lines" mode, <code>enableDebugWireframe</code>
|
|
29942
|
+
* must be set to <code>true</code> when the tileset is created, otherwise this method
|
|
29943
|
+
* will have no effect. The "barycentric" mode works without enableDebugWireframe.
|
|
29944
|
+
* </p>
|
|
29945
29945
|
* @param [options] - Optional parameters for wireframe display
|
|
29946
|
-
* @param [options.color = Color.WHITE] -
|
|
29947
|
-
* @param [options.
|
|
29946
|
+
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
29947
|
+
* @param [options.fillColor] - The fill color of the tileset when in wireframe mode. If undefined, the tileset's original material/color is preserved.
|
|
29948
|
+
* @param [options.fillAlpha = 0.2] - The alpha value of the fill color. Only applies when fillColor is specified.
|
|
29949
|
+
* @param [options.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE] - How the fill color blends with features. Only applies when fillColor is specified.
|
|
29948
29950
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
29949
29951
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the tileset's original material (only applies to barycentric mode)
|
|
29950
29952
|
* @returns This tileset instance, to allow chaining of method calls.
|
|
29951
29953
|
*/
|
|
29952
29954
|
showWireframe(options?: {
|
|
29953
29955
|
color?: Color;
|
|
29956
|
+
fillColor?: Color;
|
|
29957
|
+
fillAlpha?: number;
|
|
29954
29958
|
colorBlendMode?: Cesium3DTileColorBlendMode;
|
|
29955
29959
|
mode?: "lines" | "barycentric";
|
|
29956
29960
|
overlay?: boolean;
|
|
29957
29961
|
}): Cesium3DTileset;
|
|
29958
29962
|
/**
|
|
29959
29963
|
* Hides the tileset's wireframe, restoring it to normal rendering mode.
|
|
29960
|
-
|
|
29961
|
-
|
|
29962
|
-
|
|
29964
|
+
* <p>
|
|
29965
|
+
* Only affects this tileset; other tilesets in the scene remain unchanged.
|
|
29966
|
+
* </p>
|
|
29963
29967
|
* @returns This tileset instance, to allow chaining of method calls.
|
|
29964
29968
|
*/
|
|
29965
29969
|
hideWireframe(): Cesium3DTileset;
|
|
29966
29970
|
/**
|
|
29967
29971
|
* Toggles the tileset's wireframe display state.
|
|
29968
|
-
|
|
29969
|
-
|
|
29970
|
-
|
|
29971
|
-
|
|
29972
|
-
|
|
29973
|
-
|
|
29974
|
-
|
|
29975
|
-
|
|
29976
|
-
|
|
29977
|
-
|
|
29972
|
+
* <p>
|
|
29973
|
+
* If the tileset is currently in wireframe mode, it will be switched to normal
|
|
29974
|
+
* mode, and vice versa. Only affects this tileset; other tilesets in the scene
|
|
29975
|
+
* remain unchanged.
|
|
29976
|
+
* </p>
|
|
29977
|
+
* <p>
|
|
29978
|
+
* For WebGL1 environments using "lines" mode, <code>enableDebugWireframe</code>
|
|
29979
|
+
* must be set to <code>true</code> when the tileset is created, otherwise enabling
|
|
29980
|
+
* wireframe will have no effect. The "barycentric" mode works without enableDebugWireframe.
|
|
29981
|
+
* </p>
|
|
29978
29982
|
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
29979
29983
|
* @param [options.color = Color.WHITE] - A color to apply to all features
|
|
29980
29984
|
* @param [options.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE] - How the color blends with features
|
|
29981
29985
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
29982
29986
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the tileset's original material (only applies to barycentric mode)
|
|
29983
29987
|
* @returns <code>true</code> if the tileset is now displayed in
|
|
29984
|
-
|
|
29988
|
+
* wireframe mode, <code>false</code> if it is in normal mode.
|
|
29985
29989
|
*/
|
|
29986
29990
|
toggleWireframe(options?: {
|
|
29987
29991
|
color?: Color;
|
|
@@ -38571,96 +38575,96 @@ export enum LightingModel {
|
|
|
38571
38575
|
|
|
38572
38576
|
/**
|
|
38573
38577
|
* <div class="notice">
|
|
38574
|
-
To construct a Model, call {@link Model.fromGltfAsync}. Do not call the constructor directly.
|
|
38575
|
-
</div>
|
|
38576
|
-
A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
38577
|
-
<p>
|
|
38578
|
-
Cesium supports glTF assets with the following extensions:
|
|
38579
|
-
<ul>
|
|
38580
|
-
<li>
|
|
38581
|
-
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
38582
|
-
</li>
|
|
38583
|
-
<li>
|
|
38584
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
|
|
38585
|
-
</li>
|
|
38586
|
-
<li>
|
|
38587
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
|
|
38588
|
-
</li>
|
|
38589
|
-
<li>
|
|
38590
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
|
|
38591
|
-
</li>
|
|
38592
|
-
<li>
|
|
38593
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
|
|
38594
|
-
</li>
|
|
38595
|
-
<li>
|
|
38596
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
38597
|
-
</li>
|
|
38598
|
-
<li>
|
|
38599
|
-
{@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
|
|
38600
|
-
</li>
|
|
38601
|
-
<li>
|
|
38602
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
|
|
38603
|
-
</li>
|
|
38604
|
-
<li>
|
|
38605
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
|
|
38606
|
-
</li>
|
|
38607
|
-
<li>
|
|
38608
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
|
|
38609
|
-
</li>
|
|
38610
|
-
<li>
|
|
38611
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
38612
|
-
</li>
|
|
38613
|
-
<li>
|
|
38614
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
38615
|
-
</li>
|
|
38616
|
-
<li>
|
|
38617
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
|
|
38618
|
-
</li>
|
|
38619
|
-
<li>
|
|
38620
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
|
|
38621
|
-
</li>
|
|
38622
|
-
<li>
|
|
38623
|
-
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
38624
|
-
</li>
|
|
38625
|
-
<li>
|
|
38626
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
38627
|
-
</li>
|
|
38628
|
-
<li>
|
|
38629
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
38630
|
-
</li>
|
|
38631
|
-
<li>
|
|
38632
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
38633
|
-
</li>
|
|
38634
|
-
<li>
|
|
38635
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
|
|
38636
|
-
</li>
|
|
38637
|
-
<li>
|
|
38638
|
-
{@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local (experimental)}
|
|
38639
|
-
</li>
|
|
38640
|
-
</ul>
|
|
38641
|
-
</p>
|
|
38642
|
-
<p>
|
|
38643
|
-
Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
|
|
38644
|
-
for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
|
|
38645
|
-
and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
|
|
38646
|
-
</p>
|
|
38578
|
+
* To construct a Model, call {@link Model.fromGltfAsync}. Do not call the constructor directly.
|
|
38579
|
+
* </div>
|
|
38580
|
+
* A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
38581
|
+
* <p>
|
|
38582
|
+
* Cesium supports glTF assets with the following extensions:
|
|
38583
|
+
* <ul>
|
|
38584
|
+
* <li>
|
|
38585
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
38586
|
+
* </li>
|
|
38587
|
+
* <li>
|
|
38588
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
|
|
38589
|
+
* </li>
|
|
38590
|
+
* <li>
|
|
38591
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
|
|
38592
|
+
* </li>
|
|
38593
|
+
* <li>
|
|
38594
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
|
|
38595
|
+
* </li>
|
|
38596
|
+
* <li>
|
|
38597
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
|
|
38598
|
+
* </li>
|
|
38599
|
+
* <li>
|
|
38600
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
38601
|
+
* </li>
|
|
38602
|
+
* <li>
|
|
38603
|
+
* {@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
|
|
38604
|
+
* </li>
|
|
38605
|
+
* <li>
|
|
38606
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
|
|
38607
|
+
* </li>
|
|
38608
|
+
* <li>
|
|
38609
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
|
|
38610
|
+
* </li>
|
|
38611
|
+
* <li>
|
|
38612
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
|
|
38613
|
+
* </li>
|
|
38614
|
+
* <li>
|
|
38615
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
38616
|
+
* </li>
|
|
38617
|
+
* <li>
|
|
38618
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
38619
|
+
* </li>
|
|
38620
|
+
* <li>
|
|
38621
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
|
|
38622
|
+
* </li>
|
|
38623
|
+
* <li>
|
|
38624
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
|
|
38625
|
+
* </li>
|
|
38626
|
+
* <li>
|
|
38627
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
38628
|
+
* </li>
|
|
38629
|
+
* <li>
|
|
38630
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
38631
|
+
* </li>
|
|
38632
|
+
* <li>
|
|
38633
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
38634
|
+
* </li>
|
|
38635
|
+
* <li>
|
|
38636
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
38637
|
+
* </li>
|
|
38638
|
+
* <li>
|
|
38639
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
|
|
38640
|
+
* </li>
|
|
38641
|
+
* <li>
|
|
38642
|
+
* {@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local (experimental)}
|
|
38643
|
+
* </li>
|
|
38644
|
+
* </ul>
|
|
38645
|
+
* </p>
|
|
38646
|
+
* <p>
|
|
38647
|
+
* Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
|
|
38648
|
+
* for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
|
|
38649
|
+
* and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
|
|
38650
|
+
* </p>
|
|
38647
38651
|
*/
|
|
38648
38652
|
export class Model {
|
|
38649
38653
|
constructor();
|
|
38650
38654
|
/**
|
|
38651
38655
|
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
|
38652
|
-
|
|
38653
|
-
|
|
38654
|
-
|
|
38656
|
+
* When this is the identity matrix, the model is drawn in world coordinates, i.e., Earth's Cartesian WGS84 coordinates.
|
|
38657
|
+
* Local reference frames can be used by providing a different transformation matrix, like that returned
|
|
38658
|
+
* by {@link Transforms.eastNorthUpToFixedFrame}.
|
|
38655
38659
|
* @example
|
|
38656
38660
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
38657
|
-
|
|
38661
|
+
* m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
38658
38662
|
*/
|
|
38659
38663
|
modelMatrix: Matrix4;
|
|
38660
38664
|
/**
|
|
38661
38665
|
* Whether to display the outline for models using the
|
|
38662
|
-
|
|
38663
|
-
|
|
38666
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
|
|
38667
|
+
* When true, outlines are displayed. When false, outlines are not displayed.
|
|
38664
38668
|
*/
|
|
38665
38669
|
showOutline: boolean;
|
|
38666
38670
|
/**
|
|
@@ -38669,29 +38673,29 @@ export class Model {
|
|
|
38669
38673
|
outlineColor: Color;
|
|
38670
38674
|
/**
|
|
38671
38675
|
* When <code>true</code>, this model is ready to render, i.e., the external binary, image,
|
|
38672
|
-
|
|
38676
|
+
* and shader files were downloaded and the WebGL resources were created.
|
|
38673
38677
|
*/
|
|
38674
38678
|
readonly ready: boolean;
|
|
38675
38679
|
/**
|
|
38676
38680
|
* Gets an event that is raised when the model encounters an asynchronous rendering error. By subscribing
|
|
38677
|
-
|
|
38678
|
-
|
|
38681
|
+
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
38682
|
+
* are passed an instance of {@link ModelError}.
|
|
38679
38683
|
*/
|
|
38680
38684
|
readonly errorEvent: Event;
|
|
38681
38685
|
/**
|
|
38682
38686
|
* Gets an event that is raised when the model is loaded and ready for rendering, i.e. when the external resources
|
|
38683
|
-
|
|
38684
|
-
|
|
38685
|
-
|
|
38686
|
-
|
|
38687
|
-
|
|
38688
|
-
|
|
38687
|
+
* have been downloaded and the WebGL resources are created. Event listeners
|
|
38688
|
+
* are passed an instance of the {@link Model}.
|
|
38689
|
+
*
|
|
38690
|
+
* <p>
|
|
38691
|
+
* If {@link Model.incrementallyLoadTextures} is true, this event will be raised before all textures are loaded and ready for rendering. Subscribe to {@link Model.texturesReadyEvent} to be notified when the textures are ready.
|
|
38692
|
+
* </p>
|
|
38689
38693
|
*/
|
|
38690
38694
|
readonly readyEvent: Event;
|
|
38691
38695
|
/**
|
|
38692
38696
|
* Gets an event that, if {@link Model.incrementallyLoadTextures} is true, is raised when the model textures are loaded and ready for rendering, i.e. when the external resources
|
|
38693
|
-
|
|
38694
|
-
|
|
38697
|
+
* have been downloaded and the WebGL resources are created. Event listeners
|
|
38698
|
+
* are passed an instance of the {@link Model}.
|
|
38695
38699
|
*/
|
|
38696
38700
|
readonly texturesReadyEvent: Event;
|
|
38697
38701
|
/**
|
|
@@ -38704,23 +38708,23 @@ export class Model {
|
|
|
38704
38708
|
clampAnimations: boolean;
|
|
38705
38709
|
/**
|
|
38706
38710
|
* Point cloud shading settings for controlling point cloud attenuation
|
|
38707
|
-
|
|
38708
|
-
|
|
38711
|
+
* and lighting. For 3D Tiles, this is inherited from the
|
|
38712
|
+
* {@link Cesium3DTileset}.
|
|
38709
38713
|
*/
|
|
38710
38714
|
pointCloudShading: PointCloudShading;
|
|
38711
38715
|
/**
|
|
38712
38716
|
* The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle}
|
|
38713
|
-
|
|
38717
|
+
* may lead to undefined behavior.
|
|
38714
38718
|
*/
|
|
38715
38719
|
customShader: CustomShader;
|
|
38716
38720
|
/**
|
|
38717
38721
|
* The height reference of the model, which determines how the model is drawn
|
|
38718
|
-
|
|
38722
|
+
* relative to terrain.
|
|
38719
38723
|
*/
|
|
38720
38724
|
heightReference: HeightReference;
|
|
38721
38725
|
/**
|
|
38722
38726
|
* Gets or sets the distance display condition, which specifies at what distance
|
|
38723
|
-
|
|
38727
|
+
* from the camera this model will be displayed.
|
|
38724
38728
|
*/
|
|
38725
38729
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
38726
38730
|
/**
|
|
@@ -38753,48 +38757,66 @@ export class Model {
|
|
|
38753
38757
|
silhouetteSize: number;
|
|
38754
38758
|
/**
|
|
38755
38759
|
* Gets the model's bounding sphere in world space. This does not take into account
|
|
38756
|
-
|
|
38757
|
-
|
|
38760
|
+
* glTF animations, skins, or morph targets. It also does not account for
|
|
38761
|
+
* {@link Model#minimumPixelSize}.
|
|
38758
38762
|
*/
|
|
38759
38763
|
readonly boundingSphere: BoundingSphere;
|
|
38760
38764
|
/**
|
|
38761
38765
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38762
|
-
|
|
38763
|
-
|
|
38764
|
-
|
|
38766
|
+
* <p>
|
|
38767
|
+
* Draws the bounding sphere for each draw command in the model.
|
|
38768
|
+
* </p>
|
|
38765
38769
|
*/
|
|
38766
38770
|
debugShowBoundingVolume: boolean;
|
|
38767
38771
|
/**
|
|
38768
38772
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38769
|
-
|
|
38770
|
-
|
|
38771
|
-
|
|
38773
|
+
* <p>
|
|
38774
|
+
* Draws the model in wireframe.
|
|
38775
|
+
* </p>
|
|
38772
38776
|
*/
|
|
38773
38777
|
debugWireframe: boolean;
|
|
38774
38778
|
/**
|
|
38775
38779
|
* This property is for debugging only; it is not optimized for production use.
|
|
38776
|
-
|
|
38777
|
-
|
|
38778
|
-
|
|
38779
|
-
|
|
38780
|
-
|
|
38780
|
+
* <p>
|
|
38781
|
+
* The color of the wireframe edges. Only applies when
|
|
38782
|
+
* <code>debugWireframeMode</code> is set to "barycentric".
|
|
38783
|
+
* </p>
|
|
38784
|
+
*/
|
|
38785
|
+
debugWireframeColor: Color;
|
|
38786
|
+
/**
|
|
38787
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38788
|
+
* <p>
|
|
38789
|
+
* The alpha value of the model's fill color when rendering in barycentric
|
|
38790
|
+
* wireframe mode. A value of 0.0 makes the fill fully transparent, showing
|
|
38791
|
+
* only the wireframe edges. A value of 1.0 makes the fill fully opaque.
|
|
38792
|
+
* Only applies when <code>debugWireframeMode</code> is set to "barycentric".
|
|
38793
|
+
* </p>
|
|
38794
|
+
*/
|
|
38795
|
+
debugWireframeFillAlpha: number;
|
|
38796
|
+
/**
|
|
38797
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38798
|
+
* <p>
|
|
38799
|
+
* The line width to use when rendering the model in wireframe mode.
|
|
38800
|
+
* This only applies when <code>debugWireframeMode</code> is set to "barycentric".
|
|
38801
|
+
* For "lines" mode, the line width is limited by the browser's WebGL implementation.
|
|
38802
|
+
* </p>
|
|
38781
38803
|
*/
|
|
38782
38804
|
debugWireframeLineWidth: number;
|
|
38783
38805
|
/**
|
|
38784
38806
|
* This property is for debugging only; it is not optimized for production use.
|
|
38785
|
-
|
|
38786
|
-
|
|
38787
|
-
|
|
38807
|
+
* <p>
|
|
38808
|
+
* The mode to use when rendering the model in wireframe mode.
|
|
38809
|
+
* </p>
|
|
38788
38810
|
*/
|
|
38789
38811
|
debugWireframeMode: "lines" | "barycentric";
|
|
38790
38812
|
/**
|
|
38791
38813
|
* This property is for debugging only; it is not optimized for production use.
|
|
38792
|
-
|
|
38793
|
-
|
|
38794
|
-
|
|
38795
|
-
|
|
38796
|
-
|
|
38797
|
-
|
|
38814
|
+
* <p>
|
|
38815
|
+
* When <code>true</code>, the wireframe color is overlaid on top of the model's
|
|
38816
|
+
* original material. When <code>false</code>, the wireframe color replaces the
|
|
38817
|
+
* model's original material entirely. Only applies when <code>debugWireframeMode</code>
|
|
38818
|
+
* is set to "barycentric".
|
|
38819
|
+
* </p>
|
|
38798
38820
|
*/
|
|
38799
38821
|
debugWireframeOverlay: boolean;
|
|
38800
38822
|
/**
|
|
@@ -38803,30 +38825,30 @@ export class Model {
|
|
|
38803
38825
|
show: boolean;
|
|
38804
38826
|
/**
|
|
38805
38827
|
* Label of the feature ID set to use for picking and styling.
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
38818
|
-
|
|
38819
|
-
|
|
38828
|
+
* <p>
|
|
38829
|
+
* For EXT_mesh_features, this is the feature ID's label property, or
|
|
38830
|
+
* "featureId_N" (where N is the index in the featureIds array) when not
|
|
38831
|
+
* specified. EXT_feature_metadata did not have a label field, so such
|
|
38832
|
+
* feature ID sets are always labeled "featureId_N" where N is the index in
|
|
38833
|
+
* the list of all feature Ids, where feature ID attributes are listed before
|
|
38834
|
+
* feature ID textures.
|
|
38835
|
+
* </p>
|
|
38836
|
+
* <p>
|
|
38837
|
+
* If featureIdLabel is set to an integer N, it is converted to
|
|
38838
|
+
* the string "featureId_N" automatically. If both per-primitive and
|
|
38839
|
+
* per-instance feature IDs are present, the instance feature IDs take
|
|
38840
|
+
* priority.
|
|
38841
|
+
* </p>
|
|
38820
38842
|
*/
|
|
38821
38843
|
featureIdLabel: string;
|
|
38822
38844
|
/**
|
|
38823
38845
|
* Label of the instance feature ID set used for picking and styling.
|
|
38824
|
-
|
|
38825
|
-
|
|
38826
|
-
|
|
38827
|
-
|
|
38828
|
-
|
|
38829
|
-
|
|
38846
|
+
* <p>
|
|
38847
|
+
* If instanceFeatureIdLabel is set to an integer N, it is converted to
|
|
38848
|
+
* the string "instanceFeatureId_N" automatically.
|
|
38849
|
+
* If both per-primitive and per-instance feature IDs are present, the
|
|
38850
|
+
* instance feature IDs take priority.
|
|
38851
|
+
* </p>
|
|
38830
38852
|
*/
|
|
38831
38853
|
instanceFeatureIdLabel: string;
|
|
38832
38854
|
/**
|
|
@@ -38841,17 +38863,17 @@ export class Model {
|
|
|
38841
38863
|
* If <code>true</code>, the model is exaggerated along the ellipsoid normal when {@link Scene.verticalExaggeration} is set to a value other than <code>1.0</code>.
|
|
38842
38864
|
* @example
|
|
38843
38865
|
* // Exaggerate terrain by a factor of 2, but prevent model exaggeration
|
|
38844
|
-
|
|
38845
|
-
|
|
38866
|
+
* scene.verticalExaggeration = 2.0;
|
|
38867
|
+
* model.enableVerticalExaggeration = false;
|
|
38846
38868
|
*/
|
|
38847
38869
|
enableVerticalExaggeration: boolean;
|
|
38848
38870
|
/**
|
|
38849
38871
|
* The directional light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
|
38850
|
-
|
|
38851
|
-
|
|
38852
|
-
|
|
38853
|
-
|
|
38854
|
-
|
|
38872
|
+
* <p>
|
|
38873
|
+
* Disabling additional light sources by setting
|
|
38874
|
+
* <code>model.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code>
|
|
38875
|
+
* will make the model much darker. Here, increasing the intensity of the light source will make the model brighter.
|
|
38876
|
+
* </p>
|
|
38855
38877
|
*/
|
|
38856
38878
|
lightColor: Cartesian3;
|
|
38857
38879
|
/**
|
|
@@ -38862,33 +38884,33 @@ export class Model {
|
|
|
38862
38884
|
* The properties for managing dynamic environment maps on this model. Affects lighting.
|
|
38863
38885
|
* @example
|
|
38864
38886
|
* // Change the ground color used for a model's environment map to a forest green
|
|
38865
|
-
|
|
38866
|
-
|
|
38887
|
+
* const environmentMapManager = model.environmentMapManager;
|
|
38888
|
+
* environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
|
|
38867
38889
|
*/
|
|
38868
38890
|
readonly environmentMapManager: DynamicEnvironmentMapManager;
|
|
38869
38891
|
/**
|
|
38870
38892
|
* Whether to cull back-facing geometry. When true, back face culling is
|
|
38871
|
-
|
|
38872
|
-
|
|
38873
|
-
|
|
38893
|
+
* determined by the material's doubleSided property; when false, back face
|
|
38894
|
+
* culling is disabled. Back faces are not culled if {@link Model#color}
|
|
38895
|
+
* is translucent or {@link Model#silhouetteSize} is greater than 0.0.
|
|
38874
38896
|
*/
|
|
38875
38897
|
backFaceCulling: boolean;
|
|
38876
38898
|
/**
|
|
38877
38899
|
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
|
|
38878
|
-
|
|
38879
|
-
|
|
38900
|
+
* Values greater than <code>1.0</code> increase the size of the model; values
|
|
38901
|
+
* less than <code>1.0</code> decrease.
|
|
38880
38902
|
*/
|
|
38881
38903
|
scale: number;
|
|
38882
38904
|
/**
|
|
38883
38905
|
* The approximate minimum pixel size of the model regardless of zoom.
|
|
38884
|
-
|
|
38885
|
-
|
|
38906
|
+
* This can be used to ensure that a model is visible even when the viewer
|
|
38907
|
+
* zooms out. When <code>0.0</code>, no minimum size is enforced.
|
|
38886
38908
|
*/
|
|
38887
38909
|
minimumPixelSize: number;
|
|
38888
38910
|
/**
|
|
38889
38911
|
* The maximum scale size for a model. This can be used to give
|
|
38890
|
-
|
|
38891
|
-
|
|
38912
|
+
* an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
|
|
38913
|
+
* is never an unreasonable scale.
|
|
38892
38914
|
*/
|
|
38893
38915
|
maximumScale: number;
|
|
38894
38916
|
/**
|
|
@@ -38901,7 +38923,7 @@ export class Model {
|
|
|
38901
38923
|
readonly credit: Credit;
|
|
38902
38924
|
/**
|
|
38903
38925
|
* Gets or sets whether the credits of the model will be displayed
|
|
38904
|
-
|
|
38926
|
+
* on the screen.
|
|
38905
38927
|
*/
|
|
38906
38928
|
showCreditsOnScreen: boolean;
|
|
38907
38929
|
/**
|
|
@@ -38910,118 +38932,124 @@ export class Model {
|
|
|
38910
38932
|
splitDirection: SplitDirection;
|
|
38911
38933
|
/**
|
|
38912
38934
|
* Gets the model's classification type. This determines whether terrain,
|
|
38913
|
-
|
|
38914
|
-
|
|
38915
|
-
|
|
38916
|
-
|
|
38917
|
-
|
|
38918
|
-
|
|
38919
|
-
|
|
38920
|
-
|
|
38921
|
-
|
|
38922
|
-
|
|
38923
|
-
|
|
38924
|
-
|
|
38925
|
-
|
|
38926
|
-
|
|
38927
|
-
|
|
38928
|
-
|
|
38935
|
+
* 3D Tiles, or both will be classified by this model.
|
|
38936
|
+
* <p>
|
|
38937
|
+
* Additionally, there are a few requirements/limitations:
|
|
38938
|
+
* <ul>
|
|
38939
|
+
* <li>The glTF cannot contain morph targets, skins, or animations.</li>
|
|
38940
|
+
* <li>The glTF cannot contain the <code>EXT_mesh_gpu_instancing</code> extension.</li>
|
|
38941
|
+
* <li>Only meshes with TRIANGLES can be used to classify other assets.</li>
|
|
38942
|
+
* <li>The meshes must be watertight.</li>
|
|
38943
|
+
* <li>The POSITION attribute is required.</li>
|
|
38944
|
+
* <li>If feature IDs and an index buffer are both present, all indices with the same feature id must occupy contiguous sections of the index buffer.</li>
|
|
38945
|
+
* <li>If feature IDs are present without an index buffer, all positions with the same feature id must occupy contiguous sections of the position buffer.</li>
|
|
38946
|
+
* </ul>
|
|
38947
|
+
* </p>
|
|
38948
|
+
* <p>
|
|
38949
|
+
* The 3D Tiles or terrain receiving the classification must be opaque.
|
|
38950
|
+
* </p>
|
|
38929
38951
|
*/
|
|
38930
38952
|
readonly classificationType: ClassificationType;
|
|
38931
38953
|
/**
|
|
38932
38954
|
* Returns the node with the given <code>name</code> in the glTF. This is used to
|
|
38933
|
-
|
|
38955
|
+
* modify a node's transform for user-defined animation.
|
|
38934
38956
|
* @example
|
|
38935
38957
|
* // Apply non-uniform scale to node "Hand"
|
|
38936
|
-
|
|
38937
|
-
|
|
38958
|
+
* const node = model.getNode("Hand");
|
|
38959
|
+
* node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
|
|
38938
38960
|
* @param name - The name of the node in the glTF.
|
|
38939
38961
|
* @returns The node, or <code>undefined</code> if no node with the <code>name</code> exists.
|
|
38940
38962
|
*/
|
|
38941
38963
|
getNode(name: string): ModelNode;
|
|
38942
38964
|
/**
|
|
38943
38965
|
* Sets the current value of an articulation stage. After setting one or
|
|
38944
|
-
|
|
38945
|
-
|
|
38966
|
+
* multiple stage values, call Model.applyArticulations() to
|
|
38967
|
+
* cause the node matrices to be recalculated.
|
|
38946
38968
|
* @example
|
|
38947
38969
|
* // Sets the value of the stage named "MoveX" belonging to the articulation named "SampleArticulation"
|
|
38948
|
-
|
|
38970
|
+
* model.setArticulationStage("SampleArticulation MoveX", 50.0);
|
|
38949
38971
|
* @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
|
|
38950
38972
|
* @param value - The numeric value of this stage of the articulation.
|
|
38951
38973
|
*/
|
|
38952
38974
|
setArticulationStage(articulationStageKey: string, value: number): void;
|
|
38953
38975
|
/**
|
|
38954
38976
|
* Applies any modified articulation stages to the matrix of each node that
|
|
38955
|
-
|
|
38956
|
-
|
|
38977
|
+
* participates in any articulation. Note that this will overwrite any node
|
|
38978
|
+
* transformations on participating nodes.
|
|
38957
38979
|
*/
|
|
38958
38980
|
applyArticulations(): void;
|
|
38959
38981
|
/**
|
|
38960
38982
|
* Returns the object that was created for the given extension.
|
|
38961
|
-
|
|
38962
|
-
|
|
38963
|
-
|
|
38964
|
-
|
|
38965
|
-
|
|
38983
|
+
*
|
|
38984
|
+
* The given name may be the name of a glTF extension, like `"EXT_example_extension"`.
|
|
38985
|
+
* If the specified extension was present in the root of the underlying glTF asset,
|
|
38986
|
+
* and a loader for the specified extension has processed the extension data, then
|
|
38987
|
+
* this will return the model representation of the extension.
|
|
38966
38988
|
* @param extensionName - The name of the extension
|
|
38967
38989
|
* @returns The object, or `undefined`
|
|
38968
38990
|
*/
|
|
38969
38991
|
getExtension(extensionName: string): any | undefined;
|
|
38970
38992
|
/**
|
|
38971
38993
|
* Marks the model's {@link Model#style} as dirty, which forces all features
|
|
38972
|
-
|
|
38994
|
+
* to re-evaluate the style in the next frame the model is visible.
|
|
38973
38995
|
*/
|
|
38974
38996
|
makeStyleDirty(): void;
|
|
38975
38997
|
/**
|
|
38976
38998
|
* Displays the model in wireframe mode.
|
|
38977
|
-
|
|
38978
|
-
|
|
38979
|
-
|
|
38980
|
-
|
|
38981
|
-
|
|
38982
|
-
|
|
38983
|
-
|
|
38984
|
-
|
|
38999
|
+
* <p>
|
|
39000
|
+
* Only affects this model; other models in the scene remain unchanged.
|
|
39001
|
+
* </p>
|
|
39002
|
+
* <p>
|
|
39003
|
+
* For WebGL1 environments using "lines" mode, <code>enableDebugWireframe</code>
|
|
39004
|
+
* must be set to <code>true</code> when the model is loaded, otherwise this method
|
|
39005
|
+
* will have no effect. The "barycentric" mode works without enableDebugWireframe.
|
|
39006
|
+
* </p>
|
|
38985
39007
|
* @param [options] - Optional parameters for wireframe display
|
|
38986
|
-
* @param [options.color = Color.WHITE] -
|
|
38987
|
-
* @param [options.
|
|
39008
|
+
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
39009
|
+
* @param [options.fillColor] - The fill color of the model when in wireframe mode. If undefined, the model's original material/color is preserved.
|
|
39010
|
+
* @param [options.fillAlpha = 0.2] - The alpha value of the fill color. Only applies when fillColor is specified.
|
|
39011
|
+
* @param [options.colorBlendMode = ColorBlendMode.REPLACE] - How the fill color blends with the model. Only applies when fillColor is specified.
|
|
39012
|
+
* @param [options.lineWidth = 1.0] - The width of the wireframe lines (only applies to barycentric mode)
|
|
38988
39013
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
38989
39014
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the model's original material (only applies to barycentric mode)
|
|
38990
39015
|
* @returns This model instance, to allow chaining of method calls.
|
|
38991
39016
|
*/
|
|
38992
39017
|
showWireframe(options?: {
|
|
38993
39018
|
color?: Color;
|
|
39019
|
+
fillColor?: Color;
|
|
39020
|
+
fillAlpha?: number;
|
|
38994
39021
|
colorBlendMode?: ColorBlendMode;
|
|
39022
|
+
lineWidth?: number;
|
|
38995
39023
|
mode?: "lines" | "barycentric";
|
|
38996
39024
|
overlay?: boolean;
|
|
38997
39025
|
}): Model;
|
|
38998
39026
|
/**
|
|
38999
39027
|
* Hides the model's wireframe, restoring it to normal rendering mode.
|
|
39000
|
-
|
|
39001
|
-
|
|
39002
|
-
|
|
39028
|
+
* <p>
|
|
39029
|
+
* Only affects this model; other models in the scene remain unchanged.
|
|
39030
|
+
* </p>
|
|
39003
39031
|
* @returns This model instance, to allow chaining of method calls.
|
|
39004
39032
|
*/
|
|
39005
39033
|
hideWireframe(): Model;
|
|
39006
39034
|
/**
|
|
39007
39035
|
* Toggles the model's wireframe display state.
|
|
39008
|
-
|
|
39009
|
-
|
|
39010
|
-
|
|
39011
|
-
|
|
39012
|
-
|
|
39013
|
-
|
|
39014
|
-
|
|
39015
|
-
|
|
39016
|
-
|
|
39017
|
-
|
|
39036
|
+
* <p>
|
|
39037
|
+
* If the model is currently in wireframe mode, it will be switched to normal
|
|
39038
|
+
* mode, and vice versa. Only affects this model; other models in the scene
|
|
39039
|
+
* remain unchanged.
|
|
39040
|
+
* </p>
|
|
39041
|
+
* <p>
|
|
39042
|
+
* For WebGL1 environments using "lines" mode, <code>enableDebugWireframe</code>
|
|
39043
|
+
* must be set to <code>true</code> when the model is loaded, otherwise enabling
|
|
39044
|
+
* wireframe will have no effect. The "barycentric" mode works without enableDebugWireframe.
|
|
39045
|
+
* </p>
|
|
39018
39046
|
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
39019
39047
|
* @param [options.color = Color.WHITE] - A color to apply to the model while in wireframe mode
|
|
39020
39048
|
* @param [options.colorBlendMode = ColorBlendMode.REPLACE] - How the color blends with the model
|
|
39021
39049
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
39022
39050
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the model's original material (only applies to barycentric mode)
|
|
39023
39051
|
* @returns <code>true</code> if the model is now displayed in
|
|
39024
|
-
|
|
39052
|
+
* wireframe mode, <code>false</code> if it is in normal mode.
|
|
39025
39053
|
*/
|
|
39026
39054
|
toggleWireframe(options?: {
|
|
39027
39055
|
color?: Color;
|
|
@@ -39031,97 +39059,97 @@ export class Model {
|
|
|
39031
39059
|
}): boolean;
|
|
39032
39060
|
/**
|
|
39033
39061
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
39034
|
-
|
|
39035
|
-
|
|
39036
|
-
|
|
39037
|
-
|
|
39038
|
-
|
|
39062
|
+
* get the draw commands needed to render this primitive.
|
|
39063
|
+
* <p>
|
|
39064
|
+
* Do not call this function directly. This is documented just to
|
|
39065
|
+
* list the exceptions that may be propagated when the scene is rendered:
|
|
39066
|
+
* </p>
|
|
39039
39067
|
*/
|
|
39040
39068
|
update(): void;
|
|
39041
39069
|
/**
|
|
39042
39070
|
* Returns true if this object was destroyed; otherwise, false.
|
|
39043
|
-
|
|
39044
|
-
|
|
39045
|
-
|
|
39071
|
+
* <br /><br />
|
|
39072
|
+
* If this object was destroyed, it should not be used; calling any function other than
|
|
39073
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception.
|
|
39046
39074
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
39047
39075
|
*/
|
|
39048
39076
|
isDestroyed(): boolean;
|
|
39049
39077
|
/**
|
|
39050
39078
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
39051
|
-
|
|
39052
|
-
|
|
39053
|
-
|
|
39054
|
-
|
|
39055
|
-
|
|
39079
|
+
* release of WebGL resources, instead of relying on the garbage collector to destroy this object.
|
|
39080
|
+
* <br /><br />
|
|
39081
|
+
* Once an object is destroyed, it should not be used; calling any function other than
|
|
39082
|
+
* <code>isDestroyed</code> will result in a {@link DeveloperError} exception. Therefore,
|
|
39083
|
+
* assign the return value (<code>undefined</code>) to the object as done in the example.
|
|
39056
39084
|
* @example
|
|
39057
39085
|
* model = model && model.destroy();
|
|
39058
39086
|
*/
|
|
39059
39087
|
destroy(): void;
|
|
39060
39088
|
/**
|
|
39061
39089
|
* <p>
|
|
39062
|
-
|
|
39063
|
-
|
|
39064
|
-
|
|
39065
|
-
|
|
39066
|
-
|
|
39090
|
+
* Asynchronously creates a model from a glTF asset. This function returns a promise that resolves when the model is ready to render, i.e., when the external binary, image,
|
|
39091
|
+
* and shader files are downloaded and the WebGL resources are created.
|
|
39092
|
+
* </p>
|
|
39093
|
+
* <p>
|
|
39094
|
+
* The model can be a traditional glTF asset with a .gltf extension or a Binary glTF using the .glb extension.
|
|
39067
39095
|
* @example
|
|
39068
39096
|
* // Load a model and add it to the scene
|
|
39069
|
-
|
|
39070
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
39071
|
-
|
|
39072
|
-
});
|
|
39073
|
-
viewer.scene.primitives.add(model);
|
|
39074
|
-
|
|
39075
|
-
console.log(`Failed to load model. ${error}`);
|
|
39076
|
-
|
|
39097
|
+
* try {
|
|
39098
|
+
* const model = await Cesium.Model.fromGltfAsync({
|
|
39099
|
+
* url: "../../SampleData/models/CesiumMan/Cesium_Man.glb"
|
|
39100
|
+
* });
|
|
39101
|
+
* viewer.scene.primitives.add(model);
|
|
39102
|
+
* } catch (error) {
|
|
39103
|
+
* console.log(`Failed to load model. ${error}`);
|
|
39104
|
+
* }
|
|
39077
39105
|
* @example
|
|
39078
39106
|
* // Position a model with modelMatrix and display it with a minimum size of 128 pixels
|
|
39079
|
-
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39083
|
-
|
|
39084
|
-
|
|
39085
|
-
|
|
39086
|
-
|
|
39087
|
-
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
|
|
39097
|
-
|
|
39098
|
-
|
|
39099
|
-
});
|
|
39100
|
-
viewer.scene.primitives.add(model);
|
|
39101
|
-
|
|
39102
|
-
console.log(`Failed to load model. ${error}`);
|
|
39103
|
-
|
|
39107
|
+
* const position = Cesium.Cartesian3.fromDegrees(
|
|
39108
|
+
* -123.0744619,
|
|
39109
|
+
* 44.0503706,
|
|
39110
|
+
* 5000.0
|
|
39111
|
+
* );
|
|
39112
|
+
* const headingPositionRoll = new Cesium.HeadingPitchRoll();
|
|
39113
|
+
* const fixedFrameTransform = Cesium.Transforms.localFrameToFixedFrameGenerator(
|
|
39114
|
+
* "north",
|
|
39115
|
+
* "west"
|
|
39116
|
+
* );
|
|
39117
|
+
* try {
|
|
39118
|
+
* const model = await Cesium.Model.fromGltfAsync({
|
|
39119
|
+
* url: "../../SampleData/models/CesiumAir/Cesium_Air.glb",
|
|
39120
|
+
* modelMatrix: Cesium.Transforms.headingPitchRollToFixedFrame(
|
|
39121
|
+
* position,
|
|
39122
|
+
* headingPositionRoll,
|
|
39123
|
+
* Cesium.Ellipsoid.WGS84,
|
|
39124
|
+
* fixedFrameTransform
|
|
39125
|
+
* ),
|
|
39126
|
+
* minimumPixelSize: 128,
|
|
39127
|
+
* });
|
|
39128
|
+
* viewer.scene.primitives.add(model);
|
|
39129
|
+
* } catch (error) {
|
|
39130
|
+
* console.log(`Failed to load model. ${error}`);
|
|
39131
|
+
* }
|
|
39104
39132
|
* @example
|
|
39105
39133
|
* // Load a model and play the last animation at half speed
|
|
39106
|
-
|
|
39107
|
-
|
|
39108
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
39109
|
-
|
|
39110
|
-
|
|
39111
|
-
|
|
39112
|
-
|
|
39113
|
-
});
|
|
39114
|
-
viewer.scene.primitives.add(model);
|
|
39115
|
-
model.readyEvent.addEventListener(() => {
|
|
39116
|
-
|
|
39117
|
-
|
|
39118
|
-
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
});
|
|
39122
|
-
|
|
39123
|
-
console.log(`Failed to load model. ${error}`);
|
|
39124
|
-
|
|
39134
|
+
* let animations;
|
|
39135
|
+
* try {
|
|
39136
|
+
* const model = await Cesium.Model.fromGltfAsync({
|
|
39137
|
+
* url: "../../SampleData/models/CesiumMan/Cesium_Man.glb",
|
|
39138
|
+
* gltfCallback: gltf => {
|
|
39139
|
+
* animations = gltf.animations
|
|
39140
|
+
* }
|
|
39141
|
+
* });
|
|
39142
|
+
* viewer.scene.primitives.add(model);
|
|
39143
|
+
* model.readyEvent.addEventListener(() => {
|
|
39144
|
+
* model.activeAnimations.add({
|
|
39145
|
+
* index: animations.length - 1,
|
|
39146
|
+
* loop: Cesium.ModelAnimationLoop.REPEAT,
|
|
39147
|
+
* multiplier: 0.5,
|
|
39148
|
+
* });
|
|
39149
|
+
* });
|
|
39150
|
+
* } catch (error) {
|
|
39151
|
+
* console.log(`Failed to load model. ${error}`);
|
|
39152
|
+
* }
|
|
39125
39153
|
* @param options - Object with the following properties:
|
|
39126
39154
|
* @param options.url - The url to the .gltf or .glb file.
|
|
39127
39155
|
* @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
|