@rtzh/engine 0.0.8 → 0.0.10
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/ThirdParty/Workers/zip-web-worker.js +586 -480
- package/Build/Workers/chunk-2B7VLWK3.js +58 -0
- package/Build/Workers/chunk-2CZLDPAQ.js +101 -0
- package/Build/Workers/chunk-2LMIHR6B.js +73 -0
- package/Build/Workers/chunk-2ZR6KBRW.js +8366 -0
- package/Build/Workers/chunk-32GOIUYC.js +139 -0
- package/Build/Workers/chunk-37WPNI52.js +55 -0
- package/Build/Workers/chunk-3CD4WIF4.js +101 -0
- package/Build/Workers/chunk-3L7XBXFS.js +124 -0
- package/Build/Workers/chunk-3PWX65TL.js +398 -0
- package/Build/Workers/chunk-3QLIXW6V.js +778 -0
- package/Build/Workers/chunk-3SVEN5QG.js +288 -0
- package/Build/Workers/chunk-3YO7HM5H.js +476 -0
- package/Build/Workers/chunk-3ZDA3MBK.js +114 -0
- package/Build/Workers/chunk-45SKJP37.js +102 -0
- package/Build/Workers/chunk-4C4UR2S6.js +682 -0
- package/Build/Workers/chunk-4CQDMEZY.js +2058 -0
- package/Build/Workers/chunk-4DQ3ODGO.js +629 -0
- package/Build/Workers/chunk-4GZLJPDW.js +8366 -0
- package/Build/Workers/chunk-4SZJ3KRD.js +497 -0
- package/Build/Workers/chunk-4UBPBH32.js +162 -0
- package/Build/Workers/chunk-5A4OWIAY.js +511 -0
- package/Build/Workers/chunk-5D3ECYS3.js +97 -0
- package/Build/Workers/chunk-5IOA3NCI.js +8366 -0
- package/Build/Workers/chunk-5UKR42KW.js +1483 -0
- package/Build/Workers/chunk-5WAMP6Z4.js +299 -0
- package/Build/Workers/chunk-5WKGRIN6.js +114 -0
- package/Build/Workers/chunk-6BNIWSFA.js +940 -0
- package/Build/Workers/chunk-6F4HKBHD.js +352 -0
- package/Build/Workers/chunk-6HB2DMC2.js +2719 -0
- package/Build/Workers/chunk-6J63N735.js +171 -0
- package/Build/Workers/chunk-6TWMNB7Q.js +455 -0
- package/Build/Workers/chunk-72Q33KL6.js +280 -0
- package/Build/Workers/chunk-72YPCD72.js +1067 -0
- package/Build/Workers/chunk-74HENCNJ.js +171 -0
- package/Build/Workers/chunk-7AS3X42P.js +682 -0
- package/Build/Workers/chunk-7BQLJI3P.js +692 -0
- package/Build/Workers/chunk-7C2MOK27.js +57 -0
- package/Build/Workers/chunk-7EFYX4FL.js +642 -0
- package/Build/Workers/chunk-7EU3DIKZ.js +3514 -0
- package/Build/Workers/chunk-7RAUHLDW.js +497 -0
- package/Build/Workers/chunk-AFZVC5JN.js +778 -0
- package/Build/Workers/chunk-ASGXCLGL.js +97 -0
- package/Build/Workers/chunk-B3FJJGCH.js +305 -0
- package/Build/Workers/chunk-BGG3BP2R.js +280 -0
- package/Build/Workers/chunk-BIJHMMCD.js +138 -0
- package/Build/Workers/chunk-BQRZMSMM.js +102 -0
- package/Build/Workers/chunk-BYTLHM7N.js +414 -0
- package/Build/Workers/chunk-CGAHG2LR.js +163 -0
- package/Build/Workers/chunk-CQ5PWUMS.js +37 -0
- package/Build/Workers/chunk-CQB3KRGK.js +198 -0
- package/Build/Workers/chunk-CR6BZUQC.js +1443 -0
- package/Build/Workers/chunk-CV5JLCHF.js +387 -0
- package/Build/Workers/chunk-CXDJ7YNS.js +305 -0
- package/Build/Workers/chunk-DBM2NHJ5.js +352 -0
- package/Build/Workers/chunk-DHWZGIOA.js +139 -0
- package/Build/Workers/chunk-DLRIAMQF.js +1800 -0
- package/Build/Workers/chunk-DPTYP7J3.js +75 -0
- package/Build/Workers/chunk-E7SFSMUX.js +44 -0
- package/Build/Workers/chunk-EDFDPOY6.js +55 -0
- package/Build/Workers/chunk-EE4T7VKT.js +368 -0
- package/Build/Workers/chunk-ENIF6OQ5.js +139 -0
- package/Build/Workers/chunk-ET7K6FSD.js +398 -0
- package/Build/Workers/chunk-F2BQY3GT.js +1317 -0
- package/Build/Workers/chunk-F6JVBOM5.js +788 -0
- package/Build/Workers/chunk-F7IITURY.js +497 -0
- package/Build/Workers/chunk-FARHIBOA.js +75 -0
- package/Build/Workers/chunk-FRF5LWIM.js +299 -0
- package/Build/Workers/chunk-G6PDJHNG.js +476 -0
- package/Build/Workers/chunk-GCPD37SU.js +1054 -0
- package/Build/Workers/chunk-GDHDJK32.js +1045 -0
- package/Build/Workers/chunk-GMOKUODV.js +352 -0
- package/Build/Workers/chunk-GNGGEDZK.js +352 -0
- package/Build/Workers/chunk-GNGZG6C6.js +162 -0
- package/Build/Workers/chunk-GPWELPVQ.js +198 -0
- package/Build/Workers/chunk-H3BSU65R.js +1067 -0
- package/Build/Workers/chunk-HEFUSHA6.js +3514 -0
- package/Build/Workers/chunk-HFCJLXTG.js +55 -0
- package/Build/Workers/chunk-HKII76UV.js +1800 -0
- package/Build/Workers/chunk-HKSICPYV.js +55 -0
- package/Build/Workers/chunk-HWUHUN7Z.js +387 -0
- package/Build/Workers/chunk-I3VVEQQ6.js +439 -0
- package/Build/Workers/chunk-I7LWED3Z.js +101 -0
- package/Build/Workers/chunk-IHOM6QXV.js +439 -0
- package/Build/Workers/chunk-IK4D64GY.js +439 -0
- package/Build/Workers/chunk-IKMU6YHA.js +288 -0
- package/Build/Workers/chunk-IVDXHQYL.js +124 -0
- package/Build/Workers/chunk-J2S3WMUZ.js +642 -0
- package/Build/Workers/chunk-J4PNHKWO.js +2719 -0
- package/Build/Workers/chunk-JFLJS4QU.js +1443 -0
- package/Build/Workers/chunk-JJWMDUOJ.js +44 -0
- package/Build/Workers/chunk-JM4TFRYQ.js +163 -0
- package/Build/Workers/chunk-JNNIPGJU.js +163 -0
- package/Build/Workers/chunk-JOQFYJZ2.js +692 -0
- package/Build/Workers/chunk-JQ7IQ56G.js +837 -0
- package/Build/Workers/chunk-JUJONRWD.js +788 -0
- package/Build/Workers/chunk-K2PUGKEO.js +2058 -0
- package/Build/Workers/chunk-KMJD5APO.js +162 -0
- package/Build/Workers/chunk-KWX3CJFT.js +198 -0
- package/Build/Workers/chunk-L33HPENB.js +75 -0
- package/Build/Workers/chunk-LFQ63ZU4.js +455 -0
- package/Build/Workers/chunk-LHJDLAZT.js +1483 -0
- package/Build/Workers/chunk-LSGHTNF5.js +511 -0
- package/Build/Workers/chunk-LVU4AZC6.js +219 -0
- package/Build/Workers/chunk-LXOUU2I5.js +219 -0
- package/Build/Workers/chunk-M7EEEKQE.js +476 -0
- package/Build/Workers/chunk-MCJRXFRL.js +102 -0
- package/Build/Workers/chunk-MLL4AAXV.js +1460 -0
- package/Build/Workers/chunk-MPCZC3G6.js +414 -0
- package/Build/Workers/chunk-MPHEIDPB.js +629 -0
- package/Build/Workers/chunk-MXKQUDTP.js +55 -0
- package/Build/Workers/chunk-NEF7XO5W.js +940 -0
- package/Build/Workers/chunk-NL7US44X.js +171 -0
- package/Build/Workers/chunk-NSRZZEHH.js +455 -0
- package/Build/Workers/chunk-NUMQ72QV.js +55 -0
- package/Build/Workers/chunk-NXZJKIYD.js +97 -0
- package/Build/Workers/chunk-O4MZOV3C.js +414 -0
- package/Build/Workers/chunk-OD7UYXFV.js +352 -0
- package/Build/Workers/chunk-OOIZ7CHP.js +114 -0
- package/Build/Workers/chunk-OX4DGIUJ.js +788 -0
- package/Build/Workers/chunk-PEEYBEL5.js +2058 -0
- package/Build/Workers/chunk-PEUDXOFI.js +241 -0
- package/Build/Workers/chunk-PKXFFIEZ.js +57 -0
- package/Build/Workers/chunk-Q2X2Z7JH.js +241 -0
- package/Build/Workers/chunk-QFN5B75P.js +1054 -0
- package/Build/Workers/chunk-QOLOPE4O.js +1317 -0
- package/Build/Workers/chunk-R2AFDOIY.js +778 -0
- package/Build/Workers/chunk-RBLCJVK6.js +73 -0
- package/Build/Workers/chunk-RGD6RGTH.js +138 -0
- package/Build/Workers/chunk-RJ564LVX.js +398 -0
- package/Build/Workers/chunk-RNZ5L3W4.js +387 -0
- package/Build/Workers/chunk-SCF2OVAZ.js +219 -0
- package/Build/Workers/chunk-SJX7UJNW.js +241 -0
- package/Build/Workers/chunk-SPPYSEH2.js +1460 -0
- package/Build/Workers/chunk-SSE2O2SB.js +1460 -0
- package/Build/Workers/chunk-SX6GJD6B.js +837 -0
- package/Build/Workers/chunk-SXISWCV7.js +58 -0
- package/Build/Workers/chunk-SZQC2TUH.js +368 -0
- package/Build/Workers/chunk-TAWVKT4B.js +58 -0
- package/Build/Workers/chunk-TBEKWAR5.js +73 -0
- package/Build/Workers/chunk-TE277WT3.js +280 -0
- package/Build/Workers/chunk-TFL2ZV77.js +692 -0
- package/Build/Workers/chunk-THWXTO7B.js +57 -0
- package/Build/Workers/chunk-TSNKYHSC.js +305 -0
- package/Build/Workers/chunk-TYQ7MNMK.js +37 -0
- package/Build/Workers/chunk-U267N6IJ.js +299 -0
- package/Build/Workers/chunk-ULWO6TCN.js +352 -0
- package/Build/Workers/chunk-UQSQNTEF.js +368 -0
- package/Build/Workers/chunk-USWXYJRX.js +1045 -0
- package/Build/Workers/chunk-UTDSEOTC.js +288 -0
- package/Build/Workers/chunk-UUKLWTJC.js +2719 -0
- package/Build/Workers/chunk-UZXJSLDO.js +3514 -0
- package/Build/Workers/chunk-V7QHEF6O.js +1317 -0
- package/Build/Workers/chunk-VFC54WB7.js +940 -0
- package/Build/Workers/chunk-VG7NX64T.js +37 -0
- package/Build/Workers/chunk-VIMRGSM5.js +256 -0
- package/Build/Workers/chunk-VL4QTEZC.js +138 -0
- package/Build/Workers/chunk-VP2OAU4C.js +124 -0
- package/Build/Workers/chunk-W3LNGBJU.js +44 -0
- package/Build/Workers/chunk-WDMHDACX.js +1800 -0
- package/Build/Workers/chunk-WF224D4A.js +642 -0
- package/Build/Workers/chunk-WZJEAPEP.js +629 -0
- package/Build/Workers/chunk-XHGB5IOL.js +1045 -0
- package/Build/Workers/chunk-XMIENZET.js +256 -0
- package/Build/Workers/chunk-XXD3TQVI.js +837 -0
- package/Build/Workers/chunk-XZN7KCY3.js +1054 -0
- package/Build/Workers/chunk-YCTK62TY.js +1483 -0
- package/Build/Workers/chunk-YWPKCFKZ.js +1443 -0
- package/Build/Workers/chunk-YWSB7PZP.js +511 -0
- package/Build/Workers/chunk-ZEEVOFG2.js +256 -0
- package/Build/Workers/chunk-ZVXETFPZ.js +1067 -0
- package/Build/Workers/chunk-ZXZTWDTN.js +682 -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/Renderer/AutomaticUniforms.js +76 -1
- package/Source/Renderer/UniformState.js +108 -1
- package/Source/Scene/Cesium3DTileset.js +4157 -4157
- package/Source/Scene/Model/BarycentricWireframePipelineStage.js +462 -414
- package/Source/Scene/Model/LightingPipelineStage.js +17 -2
- package/Source/Scene/Model/Model.js +3646 -3623
- package/Source/Scene/Model/Model3DTileContent.js +568 -580
- package/Source/Scene/Model/ModelRuntimePrimitive.js +391 -391
- package/Source/Scene/Model/WireframePipelineStage.js +122 -122
- package/Source/Scene/PointLight.js +36 -0
- package/Source/Scene/Scene.js +9 -1
- package/Source/Shaders/Model/LightingStageFS.glsl +33 -0
- package/Source/Shaders/Model/LightingStageFS.js +33 -0
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/index.d.ts +809 -779
- package/index.js +48 -47
- 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
|
-
|
|
29036
|
-
|
|
29037
|
-
|
|
29038
|
-
|
|
29039
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29052
|
-
|
|
29053
|
-
|
|
29054
|
-
|
|
29055
|
-
|
|
29056
|
-
|
|
29057
|
-
|
|
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
|
-
|
|
29063
|
-
|
|
29064
|
-
|
|
29065
|
-
|
|
29066
|
-
|
|
29067
|
-
|
|
29068
|
-
|
|
29069
|
-
|
|
29070
|
-
|
|
29071
|
-
|
|
29072
|
-
|
|
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
|
-
|
|
29076
|
-
|
|
29077
|
-
|
|
29078
|
-
|
|
29079
|
-
|
|
29080
|
-
|
|
29081
|
-
|
|
29082
|
-
|
|
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,14 +29934,14 @@ 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
29946
|
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
29947
29947
|
* @param [options.fillColor] - The fill color of the tileset when in wireframe mode. If undefined, the tileset's original material/color is preserved.
|
|
@@ -29961,31 +29961,31 @@ export class Cesium3DTileset {
|
|
|
29961
29961
|
}): Cesium3DTileset;
|
|
29962
29962
|
/**
|
|
29963
29963
|
* Hides the tileset's wireframe, restoring it to normal rendering mode.
|
|
29964
|
-
|
|
29965
|
-
|
|
29966
|
-
|
|
29964
|
+
<p>
|
|
29965
|
+
Only affects this tileset; other tilesets in the scene remain unchanged.
|
|
29966
|
+
</p>
|
|
29967
29967
|
* @returns This tileset instance, to allow chaining of method calls.
|
|
29968
29968
|
*/
|
|
29969
29969
|
hideWireframe(): Cesium3DTileset;
|
|
29970
29970
|
/**
|
|
29971
29971
|
* Toggles the tileset's wireframe display state.
|
|
29972
|
-
|
|
29973
|
-
|
|
29974
|
-
|
|
29975
|
-
|
|
29976
|
-
|
|
29977
|
-
|
|
29978
|
-
|
|
29979
|
-
|
|
29980
|
-
|
|
29981
|
-
|
|
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>
|
|
29982
29982
|
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
29983
29983
|
* @param [options.color = Color.WHITE] - A color to apply to all features
|
|
29984
29984
|
* @param [options.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE] - How the color blends with features
|
|
29985
29985
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
29986
29986
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the tileset's original material (only applies to barycentric mode)
|
|
29987
29987
|
* @returns <code>true</code> if the tileset is now displayed in
|
|
29988
|
-
|
|
29988
|
+
wireframe mode, <code>false</code> if it is in normal mode.
|
|
29989
29989
|
*/
|
|
29990
29990
|
toggleWireframe(options?: {
|
|
29991
29991
|
color?: Color;
|
|
@@ -38575,96 +38575,96 @@ export enum LightingModel {
|
|
|
38575
38575
|
|
|
38576
38576
|
/**
|
|
38577
38577
|
* <div class="notice">
|
|
38578
|
-
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
|
|
38583
|
-
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
|
|
38588
|
-
|
|
38589
|
-
|
|
38590
|
-
|
|
38591
|
-
|
|
38592
|
-
|
|
38593
|
-
|
|
38594
|
-
|
|
38595
|
-
|
|
38596
|
-
|
|
38597
|
-
|
|
38598
|
-
|
|
38599
|
-
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38605
|
-
|
|
38606
|
-
|
|
38607
|
-
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
|
|
38612
|
-
|
|
38613
|
-
|
|
38614
|
-
|
|
38615
|
-
|
|
38616
|
-
|
|
38617
|
-
|
|
38618
|
-
|
|
38619
|
-
|
|
38620
|
-
|
|
38621
|
-
|
|
38622
|
-
|
|
38623
|
-
|
|
38624
|
-
|
|
38625
|
-
|
|
38626
|
-
|
|
38627
|
-
|
|
38628
|
-
|
|
38629
|
-
|
|
38630
|
-
|
|
38631
|
-
|
|
38632
|
-
|
|
38633
|
-
|
|
38634
|
-
|
|
38635
|
-
|
|
38636
|
-
|
|
38637
|
-
|
|
38638
|
-
|
|
38639
|
-
|
|
38640
|
-
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
|
|
38644
|
-
|
|
38645
|
-
|
|
38646
|
-
|
|
38647
|
-
|
|
38648
|
-
|
|
38649
|
-
|
|
38650
|
-
|
|
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>
|
|
38651
38651
|
*/
|
|
38652
38652
|
export class Model {
|
|
38653
38653
|
constructor();
|
|
38654
38654
|
/**
|
|
38655
38655
|
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
|
38656
|
-
|
|
38657
|
-
|
|
38658
|
-
|
|
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}.
|
|
38659
38659
|
* @example
|
|
38660
38660
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
38661
|
-
|
|
38661
|
+
m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
38662
38662
|
*/
|
|
38663
38663
|
modelMatrix: Matrix4;
|
|
38664
38664
|
/**
|
|
38665
38665
|
* Whether to display the outline for models using the
|
|
38666
|
-
|
|
38667
|
-
|
|
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.
|
|
38668
38668
|
*/
|
|
38669
38669
|
showOutline: boolean;
|
|
38670
38670
|
/**
|
|
@@ -38673,29 +38673,29 @@ export class Model {
|
|
|
38673
38673
|
outlineColor: Color;
|
|
38674
38674
|
/**
|
|
38675
38675
|
* When <code>true</code>, this model is ready to render, i.e., the external binary, image,
|
|
38676
|
-
|
|
38676
|
+
and shader files were downloaded and the WebGL resources were created.
|
|
38677
38677
|
*/
|
|
38678
38678
|
readonly ready: boolean;
|
|
38679
38679
|
/**
|
|
38680
38680
|
* Gets an event that is raised when the model encounters an asynchronous rendering error. By subscribing
|
|
38681
|
-
|
|
38682
|
-
|
|
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}.
|
|
38683
38683
|
*/
|
|
38684
38684
|
readonly errorEvent: Event;
|
|
38685
38685
|
/**
|
|
38686
38686
|
* Gets an event that is raised when the model is loaded and ready for rendering, i.e. when the external resources
|
|
38687
|
-
|
|
38688
|
-
|
|
38689
|
-
|
|
38690
|
-
|
|
38691
|
-
|
|
38692
|
-
|
|
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>
|
|
38693
38693
|
*/
|
|
38694
38694
|
readonly readyEvent: Event;
|
|
38695
38695
|
/**
|
|
38696
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
|
|
38697
|
-
|
|
38698
|
-
|
|
38697
|
+
have been downloaded and the WebGL resources are created. Event listeners
|
|
38698
|
+
are passed an instance of the {@link Model}.
|
|
38699
38699
|
*/
|
|
38700
38700
|
readonly texturesReadyEvent: Event;
|
|
38701
38701
|
/**
|
|
@@ -38708,23 +38708,23 @@ export class Model {
|
|
|
38708
38708
|
clampAnimations: boolean;
|
|
38709
38709
|
/**
|
|
38710
38710
|
* Point cloud shading settings for controlling point cloud attenuation
|
|
38711
|
-
|
|
38712
|
-
|
|
38711
|
+
and lighting. For 3D Tiles, this is inherited from the
|
|
38712
|
+
{@link Cesium3DTileset}.
|
|
38713
38713
|
*/
|
|
38714
38714
|
pointCloudShading: PointCloudShading;
|
|
38715
38715
|
/**
|
|
38716
38716
|
* The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle}
|
|
38717
|
-
|
|
38717
|
+
may lead to undefined behavior.
|
|
38718
38718
|
*/
|
|
38719
38719
|
customShader: CustomShader;
|
|
38720
38720
|
/**
|
|
38721
38721
|
* The height reference of the model, which determines how the model is drawn
|
|
38722
|
-
|
|
38722
|
+
relative to terrain.
|
|
38723
38723
|
*/
|
|
38724
38724
|
heightReference: HeightReference;
|
|
38725
38725
|
/**
|
|
38726
38726
|
* Gets or sets the distance display condition, which specifies at what distance
|
|
38727
|
-
|
|
38727
|
+
from the camera this model will be displayed.
|
|
38728
38728
|
*/
|
|
38729
38729
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
38730
38730
|
/**
|
|
@@ -38757,66 +38757,66 @@ export class Model {
|
|
|
38757
38757
|
silhouetteSize: number;
|
|
38758
38758
|
/**
|
|
38759
38759
|
* Gets the model's bounding sphere in world space. This does not take into account
|
|
38760
|
-
|
|
38761
|
-
|
|
38760
|
+
glTF animations, skins, or morph targets. It also does not account for
|
|
38761
|
+
{@link Model#minimumPixelSize}.
|
|
38762
38762
|
*/
|
|
38763
38763
|
readonly boundingSphere: BoundingSphere;
|
|
38764
38764
|
/**
|
|
38765
38765
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38766
|
-
|
|
38767
|
-
|
|
38768
|
-
|
|
38766
|
+
<p>
|
|
38767
|
+
Draws the bounding sphere for each draw command in the model.
|
|
38768
|
+
</p>
|
|
38769
38769
|
*/
|
|
38770
38770
|
debugShowBoundingVolume: boolean;
|
|
38771
38771
|
/**
|
|
38772
38772
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38773
|
-
|
|
38774
|
-
|
|
38775
|
-
|
|
38773
|
+
<p>
|
|
38774
|
+
Draws the model in wireframe.
|
|
38775
|
+
</p>
|
|
38776
38776
|
*/
|
|
38777
38777
|
debugWireframe: boolean;
|
|
38778
38778
|
/**
|
|
38779
38779
|
* This property is for debugging only; it is not optimized for production use.
|
|
38780
|
-
|
|
38781
|
-
|
|
38782
|
-
|
|
38783
|
-
|
|
38780
|
+
<p>
|
|
38781
|
+
The color of the wireframe edges. Only applies when
|
|
38782
|
+
<code>debugWireframeMode</code> is set to "barycentric".
|
|
38783
|
+
</p>
|
|
38784
38784
|
*/
|
|
38785
38785
|
debugWireframeColor: Color;
|
|
38786
38786
|
/**
|
|
38787
38787
|
* This property is for debugging only; it is not optimized for production use.
|
|
38788
|
-
|
|
38789
|
-
|
|
38790
|
-
|
|
38791
|
-
|
|
38792
|
-
|
|
38793
|
-
|
|
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
38794
|
*/
|
|
38795
38795
|
debugWireframeFillAlpha: number;
|
|
38796
38796
|
/**
|
|
38797
38797
|
* This property is for debugging only; it is not optimized for production use.
|
|
38798
|
-
|
|
38799
|
-
|
|
38800
|
-
|
|
38801
|
-
|
|
38802
|
-
|
|
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>
|
|
38803
38803
|
*/
|
|
38804
38804
|
debugWireframeLineWidth: number;
|
|
38805
38805
|
/**
|
|
38806
38806
|
* This property is for debugging only; it is not optimized for production use.
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38807
|
+
<p>
|
|
38808
|
+
The mode to use when rendering the model in wireframe mode.
|
|
38809
|
+
</p>
|
|
38810
38810
|
*/
|
|
38811
38811
|
debugWireframeMode: "lines" | "barycentric";
|
|
38812
38812
|
/**
|
|
38813
38813
|
* This property is for debugging only; it is not optimized for production use.
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
38818
|
-
|
|
38819
|
-
|
|
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>
|
|
38820
38820
|
*/
|
|
38821
38821
|
debugWireframeOverlay: boolean;
|
|
38822
38822
|
/**
|
|
@@ -38825,30 +38825,30 @@ export class Model {
|
|
|
38825
38825
|
show: boolean;
|
|
38826
38826
|
/**
|
|
38827
38827
|
* Label of the feature ID set to use for picking and styling.
|
|
38828
|
-
|
|
38829
|
-
|
|
38830
|
-
|
|
38831
|
-
|
|
38832
|
-
|
|
38833
|
-
|
|
38834
|
-
|
|
38835
|
-
|
|
38836
|
-
|
|
38837
|
-
|
|
38838
|
-
|
|
38839
|
-
|
|
38840
|
-
|
|
38841
|
-
|
|
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>
|
|
38842
38842
|
*/
|
|
38843
38843
|
featureIdLabel: string;
|
|
38844
38844
|
/**
|
|
38845
38845
|
* Label of the instance feature ID set used for picking and styling.
|
|
38846
|
-
|
|
38847
|
-
|
|
38848
|
-
|
|
38849
|
-
|
|
38850
|
-
|
|
38851
|
-
|
|
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>
|
|
38852
38852
|
*/
|
|
38853
38853
|
instanceFeatureIdLabel: string;
|
|
38854
38854
|
/**
|
|
@@ -38863,17 +38863,17 @@ export class Model {
|
|
|
38863
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>.
|
|
38864
38864
|
* @example
|
|
38865
38865
|
* // Exaggerate terrain by a factor of 2, but prevent model exaggeration
|
|
38866
|
-
|
|
38867
|
-
|
|
38866
|
+
scene.verticalExaggeration = 2.0;
|
|
38867
|
+
model.enableVerticalExaggeration = false;
|
|
38868
38868
|
*/
|
|
38869
38869
|
enableVerticalExaggeration: boolean;
|
|
38870
38870
|
/**
|
|
38871
38871
|
* The directional light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
|
38872
|
-
|
|
38873
|
-
|
|
38874
|
-
|
|
38875
|
-
|
|
38876
|
-
|
|
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>
|
|
38877
38877
|
*/
|
|
38878
38878
|
lightColor: Cartesian3;
|
|
38879
38879
|
/**
|
|
@@ -38884,33 +38884,33 @@ export class Model {
|
|
|
38884
38884
|
* The properties for managing dynamic environment maps on this model. Affects lighting.
|
|
38885
38885
|
* @example
|
|
38886
38886
|
* // Change the ground color used for a model's environment map to a forest green
|
|
38887
|
-
|
|
38888
|
-
|
|
38887
|
+
const environmentMapManager = model.environmentMapManager;
|
|
38888
|
+
environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
|
|
38889
38889
|
*/
|
|
38890
38890
|
readonly environmentMapManager: DynamicEnvironmentMapManager;
|
|
38891
38891
|
/**
|
|
38892
38892
|
* Whether to cull back-facing geometry. When true, back face culling is
|
|
38893
|
-
|
|
38894
|
-
|
|
38895
|
-
|
|
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.
|
|
38896
38896
|
*/
|
|
38897
38897
|
backFaceCulling: boolean;
|
|
38898
38898
|
/**
|
|
38899
38899
|
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
|
|
38900
|
-
|
|
38901
|
-
|
|
38900
|
+
Values greater than <code>1.0</code> increase the size of the model; values
|
|
38901
|
+
less than <code>1.0</code> decrease.
|
|
38902
38902
|
*/
|
|
38903
38903
|
scale: number;
|
|
38904
38904
|
/**
|
|
38905
38905
|
* The approximate minimum pixel size of the model regardless of zoom.
|
|
38906
|
-
|
|
38907
|
-
|
|
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.
|
|
38908
38908
|
*/
|
|
38909
38909
|
minimumPixelSize: number;
|
|
38910
38910
|
/**
|
|
38911
38911
|
* The maximum scale size for a model. This can be used to give
|
|
38912
|
-
|
|
38913
|
-
|
|
38912
|
+
an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
|
|
38913
|
+
is never an unreasonable scale.
|
|
38914
38914
|
*/
|
|
38915
38915
|
maximumScale: number;
|
|
38916
38916
|
/**
|
|
@@ -38923,7 +38923,7 @@ export class Model {
|
|
|
38923
38923
|
readonly credit: Credit;
|
|
38924
38924
|
/**
|
|
38925
38925
|
* Gets or sets whether the credits of the model will be displayed
|
|
38926
|
-
|
|
38926
|
+
on the screen.
|
|
38927
38927
|
*/
|
|
38928
38928
|
showCreditsOnScreen: boolean;
|
|
38929
38929
|
/**
|
|
@@ -38932,78 +38932,78 @@ export class Model {
|
|
|
38932
38932
|
splitDirection: SplitDirection;
|
|
38933
38933
|
/**
|
|
38934
38934
|
* Gets the model's classification type. This determines whether terrain,
|
|
38935
|
-
|
|
38936
|
-
|
|
38937
|
-
|
|
38938
|
-
|
|
38939
|
-
|
|
38940
|
-
|
|
38941
|
-
|
|
38942
|
-
|
|
38943
|
-
|
|
38944
|
-
|
|
38945
|
-
|
|
38946
|
-
|
|
38947
|
-
|
|
38948
|
-
|
|
38949
|
-
|
|
38950
|
-
|
|
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>
|
|
38951
38951
|
*/
|
|
38952
38952
|
readonly classificationType: ClassificationType;
|
|
38953
38953
|
/**
|
|
38954
38954
|
* Returns the node with the given <code>name</code> in the glTF. This is used to
|
|
38955
|
-
|
|
38955
|
+
modify a node's transform for user-defined animation.
|
|
38956
38956
|
* @example
|
|
38957
38957
|
* // Apply non-uniform scale to node "Hand"
|
|
38958
|
-
|
|
38959
|
-
|
|
38958
|
+
const node = model.getNode("Hand");
|
|
38959
|
+
node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
|
|
38960
38960
|
* @param name - The name of the node in the glTF.
|
|
38961
38961
|
* @returns The node, or <code>undefined</code> if no node with the <code>name</code> exists.
|
|
38962
38962
|
*/
|
|
38963
38963
|
getNode(name: string): ModelNode;
|
|
38964
38964
|
/**
|
|
38965
38965
|
* Sets the current value of an articulation stage. After setting one or
|
|
38966
|
-
|
|
38967
|
-
|
|
38966
|
+
multiple stage values, call Model.applyArticulations() to
|
|
38967
|
+
cause the node matrices to be recalculated.
|
|
38968
38968
|
* @example
|
|
38969
38969
|
* // Sets the value of the stage named "MoveX" belonging to the articulation named "SampleArticulation"
|
|
38970
|
-
|
|
38970
|
+
model.setArticulationStage("SampleArticulation MoveX", 50.0);
|
|
38971
38971
|
* @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
|
|
38972
38972
|
* @param value - The numeric value of this stage of the articulation.
|
|
38973
38973
|
*/
|
|
38974
38974
|
setArticulationStage(articulationStageKey: string, value: number): void;
|
|
38975
38975
|
/**
|
|
38976
38976
|
* Applies any modified articulation stages to the matrix of each node that
|
|
38977
|
-
|
|
38978
|
-
|
|
38977
|
+
participates in any articulation. Note that this will overwrite any node
|
|
38978
|
+
transformations on participating nodes.
|
|
38979
38979
|
*/
|
|
38980
38980
|
applyArticulations(): void;
|
|
38981
38981
|
/**
|
|
38982
38982
|
* Returns the object that was created for the given extension.
|
|
38983
|
-
|
|
38984
|
-
|
|
38985
|
-
|
|
38986
|
-
|
|
38987
|
-
|
|
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.
|
|
38988
38988
|
* @param extensionName - The name of the extension
|
|
38989
38989
|
* @returns The object, or `undefined`
|
|
38990
38990
|
*/
|
|
38991
38991
|
getExtension(extensionName: string): any | undefined;
|
|
38992
38992
|
/**
|
|
38993
38993
|
* Marks the model's {@link Model#style} as dirty, which forces all features
|
|
38994
|
-
|
|
38994
|
+
to re-evaluate the style in the next frame the model is visible.
|
|
38995
38995
|
*/
|
|
38996
38996
|
makeStyleDirty(): void;
|
|
38997
38997
|
/**
|
|
38998
38998
|
* Displays the model in wireframe mode.
|
|
38999
|
-
|
|
39000
|
-
|
|
39001
|
-
|
|
39002
|
-
|
|
39003
|
-
|
|
39004
|
-
|
|
39005
|
-
|
|
39006
|
-
|
|
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>
|
|
39007
39007
|
* @param [options] - Optional parameters for wireframe display
|
|
39008
39008
|
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
39009
39009
|
* @param [options.fillColor] - The fill color of the model when in wireframe mode. If undefined, the model's original material/color is preserved.
|
|
@@ -39025,31 +39025,31 @@ export class Model {
|
|
|
39025
39025
|
}): Model;
|
|
39026
39026
|
/**
|
|
39027
39027
|
* Hides the model's wireframe, restoring it to normal rendering mode.
|
|
39028
|
-
|
|
39029
|
-
|
|
39030
|
-
|
|
39028
|
+
<p>
|
|
39029
|
+
Only affects this model; other models in the scene remain unchanged.
|
|
39030
|
+
</p>
|
|
39031
39031
|
* @returns This model instance, to allow chaining of method calls.
|
|
39032
39032
|
*/
|
|
39033
39033
|
hideWireframe(): Model;
|
|
39034
39034
|
/**
|
|
39035
39035
|
* Toggles the model's wireframe display state.
|
|
39036
|
-
|
|
39037
|
-
|
|
39038
|
-
|
|
39039
|
-
|
|
39040
|
-
|
|
39041
|
-
|
|
39042
|
-
|
|
39043
|
-
|
|
39044
|
-
|
|
39045
|
-
|
|
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>
|
|
39046
39046
|
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
39047
39047
|
* @param [options.color = Color.WHITE] - A color to apply to the model while in wireframe mode
|
|
39048
39048
|
* @param [options.colorBlendMode = ColorBlendMode.REPLACE] - How the color blends with the model
|
|
39049
39049
|
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
39050
39050
|
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the model's original material (only applies to barycentric mode)
|
|
39051
39051
|
* @returns <code>true</code> if the model is now displayed in
|
|
39052
|
-
|
|
39052
|
+
wireframe mode, <code>false</code> if it is in normal mode.
|
|
39053
39053
|
*/
|
|
39054
39054
|
toggleWireframe(options?: {
|
|
39055
39055
|
color?: Color;
|
|
@@ -39059,97 +39059,97 @@ export class Model {
|
|
|
39059
39059
|
}): boolean;
|
|
39060
39060
|
/**
|
|
39061
39061
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
39062
|
-
|
|
39063
|
-
|
|
39064
|
-
|
|
39065
|
-
|
|
39066
|
-
|
|
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>
|
|
39067
39067
|
*/
|
|
39068
39068
|
update(): void;
|
|
39069
39069
|
/**
|
|
39070
39070
|
* Returns true if this object was destroyed; otherwise, false.
|
|
39071
|
-
|
|
39072
|
-
|
|
39073
|
-
|
|
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.
|
|
39074
39074
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
39075
39075
|
*/
|
|
39076
39076
|
isDestroyed(): boolean;
|
|
39077
39077
|
/**
|
|
39078
39078
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
39079
|
-
|
|
39080
|
-
|
|
39081
|
-
|
|
39082
|
-
|
|
39083
|
-
|
|
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.
|
|
39084
39084
|
* @example
|
|
39085
39085
|
* model = model && model.destroy();
|
|
39086
39086
|
*/
|
|
39087
39087
|
destroy(): void;
|
|
39088
39088
|
/**
|
|
39089
39089
|
* <p>
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
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.
|
|
39095
39095
|
* @example
|
|
39096
39096
|
* // Load a model and add it to the scene
|
|
39097
|
-
|
|
39098
|
-
|
|
39099
|
-
|
|
39100
|
-
|
|
39101
|
-
|
|
39102
|
-
|
|
39103
|
-
|
|
39104
|
-
|
|
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
|
+
}
|
|
39105
39105
|
* @example
|
|
39106
39106
|
* // Position a model with modelMatrix and display it with a minimum size of 128 pixels
|
|
39107
|
-
|
|
39108
|
-
|
|
39109
|
-
|
|
39110
|
-
|
|
39111
|
-
|
|
39112
|
-
|
|
39113
|
-
|
|
39114
|
-
|
|
39115
|
-
|
|
39116
|
-
|
|
39117
|
-
|
|
39118
|
-
|
|
39119
|
-
|
|
39120
|
-
|
|
39121
|
-
|
|
39122
|
-
|
|
39123
|
-
|
|
39124
|
-
|
|
39125
|
-
|
|
39126
|
-
|
|
39127
|
-
|
|
39128
|
-
|
|
39129
|
-
|
|
39130
|
-
|
|
39131
|
-
|
|
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
|
+
}
|
|
39132
39132
|
* @example
|
|
39133
39133
|
* // Load a model and play the last animation at half speed
|
|
39134
|
-
|
|
39135
|
-
|
|
39136
|
-
|
|
39137
|
-
|
|
39138
|
-
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39143
|
-
|
|
39144
|
-
|
|
39145
|
-
|
|
39146
|
-
|
|
39147
|
-
|
|
39148
|
-
|
|
39149
|
-
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
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
|
+
}
|
|
39153
39153
|
* @param options - Object with the following properties:
|
|
39154
39154
|
* @param options.url - The url to the .gltf or .glb file.
|
|
39155
39155
|
* @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
|
|
@@ -40668,6 +40668,32 @@ export class PointCloudShading {
|
|
|
40668
40668
|
static isSupported(scene: Scene): boolean;
|
|
40669
40669
|
}
|
|
40670
40670
|
|
|
40671
|
+
/**
|
|
40672
|
+
* A point light that radiates light in all directions from a single point in space.
|
|
40673
|
+
Point lights are useful for simulating local light sources like light bulbs or torches.
|
|
40674
|
+
* @example
|
|
40675
|
+
* const pointLight = new Cesium.PointLight({
|
|
40676
|
+
position: Cesium.Cartesian3.fromDegrees(116.0, 39.0, 100),
|
|
40677
|
+
color: new Cesium.Color(1.0, 1.0, 1.0),
|
|
40678
|
+
intensity: 10.0,
|
|
40679
|
+
range: 500.0
|
|
40680
|
+
});
|
|
40681
|
+
viewer.scene.pointLights.push(pointLight);
|
|
40682
|
+
* @param options - Object with the following properties:
|
|
40683
|
+
* @param options.position - The position of the light in world coordinates.
|
|
40684
|
+
* @param [options.color = Color.WHITE] - The color of the light.
|
|
40685
|
+
* @param [options.intensity = 1.0] - The intensity of the light.
|
|
40686
|
+
* @param [options.range = Number.MAX_VALUE] - The maximum distance the light reaches.
|
|
40687
|
+
*/
|
|
40688
|
+
export class PointLight {
|
|
40689
|
+
constructor(options: {
|
|
40690
|
+
position: Cartesian3;
|
|
40691
|
+
color?: Color;
|
|
40692
|
+
intensity?: number;
|
|
40693
|
+
range?: number;
|
|
40694
|
+
});
|
|
40695
|
+
}
|
|
40696
|
+
|
|
40671
40697
|
/**
|
|
40672
40698
|
* <div class="notice">
|
|
40673
40699
|
A point is created and its initial properties are set by calling {@link PointPrimitiveCollection#add}. Do not call the constructor directly.
|
|
@@ -42710,6 +42736,10 @@ export class Scene {
|
|
|
42710
42736
|
* The light source for shading. Defaults to a directional light from the Sun.
|
|
42711
42737
|
*/
|
|
42712
42738
|
light: Light;
|
|
42739
|
+
/**
|
|
42740
|
+
* An array of point lights for additional illumination.
|
|
42741
|
+
*/
|
|
42742
|
+
pointLights: PointLight[];
|
|
42713
42743
|
/**
|
|
42714
42744
|
* Whether or not to enable edge visibility rendering for 3D tiles.
|
|
42715
42745
|
When enabled, creates a framebuffer with multiple render targets
|