@rtzh/engine 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{chunk-HAY6YE7M.js → chunk-23CHWHW6.js} +4 -4
- package/Build/Workers/{chunk-3K2PK2OU.js → chunk-243UEBJF.js} +10 -10
- package/Build/Workers/{chunk-TSAJNE4K.js → chunk-27JI7F7B.js} +2 -2
- package/Build/Workers/{chunk-OVPPHDU7.js → chunk-2OWEFNS4.js} +4 -4
- package/Build/Workers/{chunk-YBVMSCW4.js → chunk-2VN5W6HA.js} +5 -5
- package/Build/Workers/{chunk-OOB2KZC6.js → chunk-2YAONTGQ.js} +7 -7
- package/Build/Workers/{chunk-JH27ZGLN.js → chunk-324L25HV.js} +6 -6
- package/Build/Workers/{chunk-6LZBBEA7.js → chunk-3EZBCDBK.js} +9 -9
- package/Build/Workers/{chunk-25BA4527.js → chunk-3JPA6GA3.js} +12 -12
- package/Build/Workers/{chunk-DP76S3IQ.js → chunk-3NSMZ3XW.js} +17 -17
- package/Build/Workers/chunk-3WRJXCJS.js +497 -0
- package/Build/Workers/{chunk-SBFTVHRW.js → chunk-3ZJ6X3BW.js} +5 -5
- package/Build/Workers/{chunk-B2VFNYD7.js → chunk-42I3QSKJ.js} +1 -1
- package/Build/Workers/{chunk-BXBGWQ3Z.js → chunk-4BJHO56J.js} +6 -6
- package/Build/Workers/{chunk-YPGJSFOO.js → chunk-4DIL24GG.js} +5 -5
- package/Build/Workers/{chunk-XOVHLPKW.js → chunk-4FEDW3WT.js} +8 -8
- package/Build/Workers/{chunk-WAS3IHIQ.js → chunk-4GPHI5UY.js} +10 -10
- package/Build/Workers/{chunk-3M5CRHSG.js → chunk-4NAHNN5G.js} +10 -10
- package/Build/Workers/{chunk-KFMCOG26.js → chunk-4SC4KVID.js} +10 -10
- package/Build/Workers/{chunk-J3FBVUY4.js → chunk-53AFSDGM.js} +1 -1
- package/Build/Workers/{chunk-Q2DXNFYW.js → chunk-54AFUJNV.js} +11 -11
- package/Build/Workers/{chunk-7NCJH26L.js → chunk-54SSO7NS.js} +5 -5
- package/Build/Workers/{chunk-2BLQ3B4Q.js → chunk-553BNJPP.js} +8 -8
- package/Build/Workers/{chunk-GDIBU55R.js → chunk-56MKFDJH.js} +12 -12
- package/Build/Workers/{chunk-K4IMD7KH.js → chunk-5DPCF65K.js} +5 -5
- package/Build/Workers/{chunk-5QTPACZQ.js → chunk-5MCUZL44.js} +6 -6
- package/Build/Workers/{chunk-VIYQ56Z7.js → chunk-5SVTAJRH.js} +12 -12
- package/Build/Workers/chunk-5T4DXPEL.js +299 -0
- package/Build/Workers/{chunk-56XTN5NJ.js → chunk-5UHIRI2A.js} +2 -2
- package/Build/Workers/{chunk-ACH67MPW.js → chunk-5W4ISZGQ.js} +14 -14
- package/Build/Workers/{chunk-KVDSJXRK.js → chunk-64VDO4BW.js} +6 -6
- package/Build/Workers/{chunk-5WAG5YKS.js → chunk-664SI23B.js} +12 -12
- package/Build/Workers/{chunk-TO7TWUET.js → chunk-6AUSOZOL.js} +7 -7
- package/Build/Workers/{chunk-SOR7PD4V.js → chunk-6GNLKYQO.js} +6 -6
- package/Build/Workers/{chunk-POY6ZE32.js → chunk-6ZF4QOFM.js} +6 -6
- package/Build/Workers/{chunk-4HXPSZRC.js → chunk-763Q2YKY.js} +14 -14
- package/Build/Workers/chunk-7MMYV5PM.js +288 -0
- package/Build/Workers/{chunk-TDI7UQBO.js → chunk-7QPQGSS3.js} +5 -5
- package/Build/Workers/{chunk-IELTSYPZ.js → chunk-7R74V5Z3.js} +8 -8
- package/Build/Workers/{chunk-PHB5MRHM.js → chunk-7X6CLAD2.js} +9 -9
- package/Build/Workers/{chunk-PV5B2YNB.js → chunk-ADQVXDEJ.js} +16 -16
- package/Build/Workers/{chunk-TWF4XRZ6.js → chunk-AEURJQ3B.js} +2 -2
- package/Build/Workers/{chunk-WLREXLZ7.js → chunk-AMJRLIO3.js} +11 -11
- package/Build/Workers/{chunk-7B23DD46.js → chunk-ATC2WXI4.js} +17 -17
- package/Build/Workers/{chunk-KVE5EAPO.js → chunk-B5ZUBUPB.js} +14 -14
- package/Build/Workers/{chunk-4Z26IS65.js → chunk-BCYABDWF.js} +18 -18
- package/Build/Workers/{chunk-E2CARZA7.js → chunk-BHTWF7UG.js} +2 -2
- package/Build/Workers/{chunk-UUJXSLQ2.js → chunk-BLZILZWF.js} +16 -16
- package/Build/Workers/{chunk-J4MIJCN5.js → chunk-CCPKBCZD.js} +6 -6
- package/Build/Workers/chunk-CMAG5O53.js +1483 -0
- package/Build/Workers/{chunk-KUAWPGSB.js → chunk-CTARL7CY.js} +13 -13
- package/Build/Workers/{chunk-FJREGHFG.js → chunk-D3FNWB3Q.js} +4 -4
- package/Build/Workers/{chunk-HI6X33GO.js → chunk-DAYNPAVN.js} +2 -2
- package/Build/Workers/{chunk-WMGESUDW.js → chunk-DIA4J2DB.js} +3 -3
- package/Build/Workers/{chunk-EISI2CR2.js → chunk-DKJMD2HX.js} +6 -6
- package/Build/Workers/{chunk-AL22JVIA.js → chunk-DVTKM7FF.js} +4 -4
- package/Build/Workers/{chunk-KBAGFNQ4.js → chunk-E5BSDIGY.js} +5 -5
- package/Build/Workers/{chunk-HU5P7PMU.js → chunk-EJVGOIOW.js} +7 -7
- package/Build/Workers/chunk-ERYOZBVC.js +171 -0
- package/Build/Workers/{chunk-UYT2PBMV.js → chunk-ET7LWDHA.js} +2 -2
- package/Build/Workers/{chunk-5BIQOSBV.js → chunk-FSYQE5XE.js} +1 -1
- package/Build/Workers/{chunk-ZV42SJKS.js → chunk-FTHCZAWE.js} +2 -2
- package/Build/Workers/{chunk-DSBEWMOQ.js → chunk-FTXEOX64.js} +17 -17
- package/Build/Workers/{chunk-R73BHGGI.js → chunk-FUFHIXPT.js} +4 -4
- package/Build/Workers/{chunk-I76SRIKN.js → chunk-G2KELS4I.js} +4 -4
- package/Build/Workers/{chunk-2CAIFJD5.js → chunk-G7PGTG3P.js} +13 -13
- package/Build/Workers/{chunk-KXB3AARU.js → chunk-GCZNJHST.js} +5 -5
- package/Build/Workers/{chunk-UTWLMOPM.js → chunk-GJFIEALZ.js} +13 -13
- package/Build/Workers/{chunk-VR2L2Y4Z.js → chunk-GZMTBQM2.js} +4 -4
- package/Build/Workers/{chunk-DBKYAGM6.js → chunk-HAR6Y2HP.js} +2 -2
- package/Build/Workers/{chunk-NOH3R3YY.js → chunk-HC6DDPFU.js} +7 -7
- package/Build/Workers/{chunk-ELXGXAYS.js → chunk-HHN2M3ES.js} +10 -10
- package/Build/Workers/chunk-HHUKBKWS.js +414 -0
- package/Build/Workers/chunk-HLIXASKN.js +476 -0
- package/Build/Workers/chunk-HM4MH5IG.js +138 -0
- package/Build/Workers/{chunk-2APW7KRS.js → chunk-IB2XQV6U.js} +2 -2
- package/Build/Workers/{chunk-6XJO625E.js → chunk-IEBTKCMB.js} +3 -3
- package/Build/Workers/{chunk-Z356SW7E.js → chunk-IXM65GBF.js} +4 -4
- package/Build/Workers/{chunk-LPM2FVDN.js → chunk-IYAZCFAC.js} +6 -6
- package/Build/Workers/{chunk-XJKMLTSH.js → chunk-IYXLSOLF.js} +10 -10
- package/Build/Workers/{chunk-6QVMKRJ4.js → chunk-JJD7S2CV.js} +18 -18
- package/Build/Workers/{chunk-D7TGILR3.js → chunk-JRPAFYGJ.js} +17 -17
- package/Build/Workers/{chunk-F5LAPCFC.js → chunk-K6PDZWHZ.js} +5 -5
- package/Build/Workers/{chunk-OAOREOSO.js → chunk-KWFCDTXS.js} +9 -9
- package/Build/Workers/{chunk-JURLMTV2.js → chunk-LENXRROQ.js} +14 -14
- package/Build/Workers/{chunk-BJ6WXQOW.js → chunk-LPJHTJDQ.js} +4 -4
- package/Build/Workers/{chunk-AIW5F22O.js → chunk-LRW2QXMW.js} +6 -6
- package/Build/Workers/{chunk-EKMWNF4U.js → chunk-MB2ZJQR3.js} +1 -1
- package/Build/Workers/{chunk-55IROWAX.js → chunk-MCNY7SPD.js} +5 -5
- package/Build/Workers/{chunk-S3AE3MZZ.js → chunk-MHEKNHOF.js} +13 -13
- package/Build/Workers/chunk-MRLJERN3.js +114 -0
- package/Build/Workers/{chunk-5CSRWY7L.js → chunk-MWN26ZEM.js} +1 -1
- package/Build/Workers/{chunk-PLLZB3R4.js → chunk-NIWB6UMY.js} +7 -7
- package/Build/Workers/{chunk-MLFVICFZ.js → chunk-NOJAQPXU.js} +4 -4
- package/Build/Workers/{chunk-5VZISKJF.js → chunk-O5QH7XD5.js} +1 -1
- package/Build/Workers/chunk-OAFZ26QL.js +837 -0
- package/Build/Workers/{chunk-AVSQILVI.js → chunk-OBM2JYMG.js} +1 -1
- package/Build/Workers/{chunk-245NZYCR.js → chunk-OBQVOEPZ.js} +5 -5
- package/Build/Workers/chunk-OC63Z35M.js +280 -0
- package/Build/Workers/{chunk-EDIUN7V3.js → chunk-ODZZZGXK.js} +7 -7
- package/Build/Workers/chunk-OEAC5XUG.js +73 -0
- package/Build/Workers/chunk-OQK27J4J.js +139 -0
- package/Build/Workers/{chunk-LN4NMLYY.js → chunk-OTDNJAYJ.js} +1 -1
- package/Build/Workers/{chunk-JFO3ELF3.js → chunk-PGYA2CMO.js} +6 -6
- package/Build/Workers/{chunk-64W2RXA4.js → chunk-PSDWIJMU.js} +7 -7
- package/Build/Workers/chunk-PW3GQAXA.js +3514 -0
- package/Build/Workers/chunk-Q2YRPH7V.js +1067 -0
- package/Build/Workers/{chunk-KKYQRQ57.js → chunk-QDNIPHD7.js} +12 -12
- package/Build/Workers/{chunk-WO5ZNC7S.js → chunk-QEGQDFX2.js} +10 -10
- package/Build/Workers/chunk-QY55DT53.js +97 -0
- package/Build/Workers/{chunk-BOV6T7FO.js → chunk-R3PTQZ6H.js} +2 -2
- package/Build/Workers/chunk-R5U3MYPS.js +198 -0
- package/Build/Workers/{chunk-IDVURFRN.js → chunk-RJIH4MDC.js} +8 -8
- package/Build/Workers/chunk-RO7SDGOD.js +352 -0
- package/Build/Workers/chunk-RT7PY6BH.js +2719 -0
- package/Build/Workers/{chunk-KH2OWUUA.js → chunk-RTJ6L5O4.js} +2 -2
- package/Build/Workers/{chunk-75UGCVME.js → chunk-SAD42JSM.js} +4 -4
- package/Build/Workers/chunk-SCNCHSTQ.js +642 -0
- package/Build/Workers/{chunk-U364CIW4.js → chunk-SFM3GNS2.js} +10 -10
- package/Build/Workers/{chunk-OFJRMGNX.js → chunk-SG56ZOPD.js} +11 -11
- package/Build/Workers/chunk-SHQEATE2.js +1045 -0
- package/Build/Workers/{chunk-FVYRV2T6.js → chunk-SLYUIIFB.js} +6 -6
- package/Build/Workers/chunk-SPL7JK6K.js +1054 -0
- package/Build/Workers/chunk-SQSWONTJ.js +241 -0
- package/Build/Workers/chunk-SRLJWNU2.js +368 -0
- package/Build/Workers/{chunk-QWV2DM66.js → chunk-SYCWSSRX.js} +4 -4
- package/Build/Workers/{chunk-HGIGANIQ.js → chunk-SZELHE7Q.js} +2 -2
- package/Build/Workers/{chunk-MQ62ZE2U.js → chunk-TBASKFFL.js} +5 -5
- package/Build/Workers/chunk-TDGGEIZE.js +398 -0
- package/Build/Workers/{chunk-HAWJ7FMN.js → chunk-TEZGNCXH.js} +8 -8
- package/Build/Workers/chunk-TIQZUI5N.js +44 -0
- package/Build/Workers/chunk-TKJHRY4V.js +511 -0
- package/Build/Workers/{chunk-KHKSE4WQ.js → chunk-TLXEQ5QY.js} +12 -12
- package/Build/Workers/chunk-U3VI26GL.js +162 -0
- package/Build/Workers/chunk-UIMHSWDJ.js +455 -0
- package/Build/Workers/chunk-UO3AWZR3.js +352 -0
- package/Build/Workers/{chunk-UOD5YNH3.js → chunk-UTXXZ7XH.js} +9 -9
- package/Build/Workers/{chunk-66YGZWBI.js → chunk-V2TRFTCU.js} +7 -7
- package/Build/Workers/chunk-V4I3IKAK.js +1460 -0
- package/Build/Workers/chunk-VLB25GGE.js +439 -0
- package/Build/Workers/{chunk-BN4WA7LX.js → chunk-W2EK42GB.js} +1 -1
- package/Build/Workers/chunk-W2OMUTYA.js +1800 -0
- package/Build/Workers/{chunk-KQIZ7AFF.js → chunk-W4DV7TAL.js} +8 -8
- package/Build/Workers/{chunk-P7M4VYFT.js → chunk-WFTPZ3ZX.js} +11 -11
- package/Build/Workers/chunk-WHOEQFL4.js +682 -0
- package/Build/Workers/{chunk-X65Y2JSA.js → chunk-WWLWTSMV.js} +1 -1
- package/Build/Workers/chunk-WX2ZANQC.js +940 -0
- package/Build/Workers/chunk-XFKTM6GN.js +2058 -0
- package/Build/Workers/chunk-XHNWVOIJ.js +219 -0
- package/Build/Workers/{chunk-DEIMB3B5.js → chunk-XNKQLSHI.js} +1 -1
- package/Build/Workers/chunk-XOXF37BU.js +1317 -0
- package/Build/Workers/chunk-YC6PFDXQ.js +8366 -0
- package/Build/Workers/chunk-YFJB3US4.js +102 -0
- package/Build/Workers/chunk-YMXATXRN.js +57 -0
- package/Build/Workers/chunk-YVRD2PO5.js +124 -0
- package/Build/Workers/chunk-Z24A5EMJ.js +387 -0
- package/Build/Workers/chunk-Z4IW5XUY.js +788 -0
- package/Build/Workers/chunk-Z5MHVJGN.js +778 -0
- package/Build/Workers/chunk-ZFHCP7RN.js +692 -0
- package/Build/Workers/{chunk-6H33B6OL.js → chunk-ZHHEFNHL.js} +1 -1
- package/Build/Workers/chunk-ZI5GDNEV.js +305 -0
- package/Build/Workers/chunk-ZYTMDBCR.js +1443 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Scene/Cesium3DTileset.js +4121 -3932
- package/Source/Scene/Model/BarycentricWireframePipelineStage.js +355 -0
- package/Source/Scene/Model/Model.js +3584 -3340
- package/Source/Scene/Model/Model3DTileContent.js +568 -551
- package/Source/Scene/Model/ModelRuntimePrimitive.js +391 -380
- package/Source/Scene/Model/WireframePipelineStage.js +122 -118
- package/Source/Shaders/Model/ModelFS.glsl +14 -0
- package/Source/Shaders/Model/ModelFS.js +14 -0
- package/Source/Shaders/Model/ModelVS.glsl +4 -0
- package/Source/Shaders/Model/ModelVS.js +4 -0
- package/index.d.ts +891 -697
- package/index.js +3 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -29022,7 +29022,7 @@ export namespace Cesium3DTileset {
|
|
|
29022
29022
|
};
|
|
29023
29023
|
/**
|
|
29024
29024
|
* Optimization option. Used as a callback when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
29025
|
-
|
|
29025
|
+
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
29026
29026
|
* @param p - The start value to interpolate.
|
|
29027
29027
|
* @param q - The end value to interpolate.
|
|
29028
29028
|
* @param time - The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
|
|
@@ -29032,54 +29032,54 @@ export namespace Cesium3DTileset {
|
|
|
29032
29032
|
|
|
29033
29033
|
/**
|
|
29034
29034
|
* A {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29035
|
-
used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29036
|
-
|
|
29037
|
-
<div class="notice">
|
|
29038
|
-
This object is normally not instantiated directly, use {@link Cesium3DTileset.fromUrl}.
|
|
29039
|
-
</div>
|
|
29035
|
+
* used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29036
|
+
*
|
|
29037
|
+
* <div class="notice">
|
|
29038
|
+
* This object is normally not instantiated directly, use {@link Cesium3DTileset.fromUrl}.
|
|
29039
|
+
* </div>
|
|
29040
29040
|
* @example
|
|
29041
29041
|
* try {
|
|
29042
|
-
|
|
29043
|
-
|
|
29044
|
-
|
|
29045
|
-
|
|
29046
|
-
} catch (error) {
|
|
29047
|
-
|
|
29048
|
-
}
|
|
29042
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29043
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json"
|
|
29044
|
+
* );
|
|
29045
|
+
* scene.primitives.add(tileset);
|
|
29046
|
+
* } catch (error) {
|
|
29047
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29048
|
+
* }
|
|
29049
29049
|
* @example
|
|
29050
29050
|
* // Turn on camera collisions with the tileset.
|
|
29051
|
-
try {
|
|
29052
|
-
|
|
29053
|
-
|
|
29054
|
-
|
|
29055
|
-
|
|
29056
|
-
|
|
29057
|
-
} catch (error) {
|
|
29058
|
-
|
|
29059
|
-
}
|
|
29051
|
+
* try {
|
|
29052
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29053
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json",
|
|
29054
|
+
* { enableCollision: true }
|
|
29055
|
+
* );
|
|
29056
|
+
* scene.primitives.add(tileset);
|
|
29057
|
+
* } catch (error) {
|
|
29058
|
+
* console.error(`Error creating tileset: ${error}`);
|
|
29059
|
+
* }
|
|
29060
29060
|
* @example
|
|
29061
29061
|
* // Common setting for the skipLevelOfDetail optimization
|
|
29062
|
-
const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29063
|
-
|
|
29064
|
-
|
|
29065
|
-
|
|
29066
|
-
|
|
29067
|
-
|
|
29068
|
-
|
|
29069
|
-
|
|
29070
|
-
|
|
29071
|
-
});
|
|
29072
|
-
scene.primitives.add(tileset);
|
|
29062
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29063
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29064
|
+
* skipLevelOfDetail: true,
|
|
29065
|
+
* baseScreenSpaceError: 1024,
|
|
29066
|
+
* skipScreenSpaceErrorFactor: 16,
|
|
29067
|
+
* skipLevels: 1,
|
|
29068
|
+
* immediatelyLoadDesiredLevelOfDetail: false,
|
|
29069
|
+
* loadSiblings: false,
|
|
29070
|
+
* cullWithChildrenBounds: true
|
|
29071
|
+
* });
|
|
29072
|
+
* scene.primitives.add(tileset);
|
|
29073
29073
|
* @example
|
|
29074
29074
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
29075
|
-
const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29076
|
-
|
|
29077
|
-
|
|
29078
|
-
|
|
29079
|
-
|
|
29080
|
-
|
|
29081
|
-
});
|
|
29082
|
-
scene.primitives.add(tileset);
|
|
29075
|
+
* const tileset = await Cesium.Cesium3DTileset.fromUrl(
|
|
29076
|
+
* "http://localhost:8002/tilesets/Seattle/tileset.json", {
|
|
29077
|
+
* dynamicScreenSpaceError: true,
|
|
29078
|
+
* dynamicScreenSpaceErrorDensity: 2.0e-4,
|
|
29079
|
+
* dynamicScreenSpaceErrorFactor: 24.0,
|
|
29080
|
+
* dynamicScreenSpaceErrorHeightFalloff: 0.25
|
|
29081
|
+
* });
|
|
29082
|
+
* scene.primitives.add(tileset);
|
|
29083
29083
|
* @param options - An object describing initialization options
|
|
29084
29084
|
*/
|
|
29085
29085
|
export class Cesium3DTileset {
|
|
@@ -29110,78 +29110,78 @@ export class Cesium3DTileset {
|
|
|
29110
29110
|
preloadFlightDestinations: boolean;
|
|
29111
29111
|
/**
|
|
29112
29112
|
* Optimization option. For street-level horizon views, use lower resolution tiles far from the camera. This reduces
|
|
29113
|
-
|
|
29114
|
-
|
|
29115
|
-
|
|
29116
|
-
|
|
29113
|
+
* the amount of data loaded and improves tileset loading time with a slight drop in visual quality in the distance.
|
|
29114
|
+
* <p>
|
|
29115
|
+
* This optimization is strongest when the camera is close to the ground plane of the tileset and looking at the
|
|
29116
|
+
* horizon. Furthermore, the results are more accurate for tightly fitting bounding volumes like box and region.
|
|
29117
29117
|
*/
|
|
29118
29118
|
dynamicScreenSpaceError: boolean;
|
|
29119
29119
|
/**
|
|
29120
29120
|
* Optimization option. Prioritize loading tiles in the center of the screen by temporarily raising the
|
|
29121
|
-
|
|
29122
|
-
|
|
29121
|
+
* screen space error for tiles around the edge of the screen. Screen space error returns to normal once all
|
|
29122
|
+
* the tiles in the center of the screen as determined by the {@link Cesium3DTileset#foveatedConeSize} are loaded.
|
|
29123
29123
|
*/
|
|
29124
29124
|
foveatedScreenSpaceError: boolean;
|
|
29125
29125
|
/**
|
|
29126
29126
|
* Gets or sets a callback to control how much to raise the screen space error for tiles outside the foveated cone,
|
|
29127
|
-
|
|
29127
|
+
* interpolating between {@link Cesium3DTileset#foveatedMinimumScreenSpaceErrorRelaxation} and {@link Cesium3DTileset#maximumScreenSpaceError}.
|
|
29128
29128
|
*/
|
|
29129
29129
|
foveatedInterpolationCallback: Cesium3DTileset.foveatedInterpolationCallback;
|
|
29130
29130
|
/**
|
|
29131
29131
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control
|
|
29132
|
-
|
|
29133
|
-
|
|
29134
|
-
|
|
29132
|
+
* how long in seconds to wait after the camera stops moving before deferred tiles start loading in.
|
|
29133
|
+
* This time delay prevents requesting tiles around the edges of the screen when the camera is moving.
|
|
29134
|
+
* Setting this to 0.0 will immediately request all tiles in any given view.
|
|
29135
29135
|
*/
|
|
29136
29136
|
foveatedTimeDelay: number;
|
|
29137
29137
|
/**
|
|
29138
29138
|
* Similar to {@link Fog#density}, this option controls the camera distance at which the {@link Cesium3DTileset#dynamicScreenSpaceError}
|
|
29139
|
-
|
|
29140
|
-
|
|
29141
|
-
|
|
29142
|
-
|
|
29143
|
-
|
|
29144
|
-
|
|
29145
|
-
|
|
29146
|
-
|
|
29147
|
-
|
|
29148
|
-
|
|
29149
|
-
|
|
29150
|
-
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29139
|
+
* optimization applies. Larger values will cause tiles closer to the camera to be affected. This value must be
|
|
29140
|
+
* non-negative.
|
|
29141
|
+
* <p>
|
|
29142
|
+
* This optimization works by rolling off the tile screen space error (SSE) with camera distance like a bell curve.
|
|
29143
|
+
* This has the effect of selecting lower resolution tiles far from the camera. Near the camera, no adjustment is
|
|
29144
|
+
* made. For tiles further away, the SSE is reduced by up to {@link Cesium3DTileset#dynamicScreenSpaceErrorFactor}
|
|
29145
|
+
* (measured in pixels of error).
|
|
29146
|
+
* </p>
|
|
29147
|
+
* <p>
|
|
29148
|
+
* Increasing the density makes the bell curve narrower so tiles closer to the camera are affected. This is analagous
|
|
29149
|
+
* to moving fog closer to the camera.
|
|
29150
|
+
* </p>
|
|
29151
|
+
* <p>
|
|
29152
|
+
* When the density is 0, the optimization will have no effect on the tileset.
|
|
29153
|
+
* </p>
|
|
29154
29154
|
*/
|
|
29155
29155
|
dynamicScreenSpaceErrorDensity: number;
|
|
29156
29156
|
/**
|
|
29157
29157
|
* A parameter that controls the intensity of the {@link Cesium3DTileset#dynamicScreenSpaceError} optimization for
|
|
29158
|
-
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
|
|
29163
|
-
|
|
29164
|
-
|
|
29165
|
-
|
|
29166
|
-
|
|
29167
|
-
|
|
29158
|
+
* tiles on the horizon. Larger values cause lower resolution tiles to load, improving runtime performance at a slight
|
|
29159
|
+
* reduction of visual quality. The value must be non-negative.
|
|
29160
|
+
* <p>
|
|
29161
|
+
* More specifically, this parameter represents the maximum adjustment to screen space error (SSE) in pixels for tiles
|
|
29162
|
+
* far away from the camera. See {@link Cesium3DTileset#dynamicScreenSpaceErrorDensity} for more details about how
|
|
29163
|
+
* this optimization works.
|
|
29164
|
+
* </p>
|
|
29165
|
+
* <p>
|
|
29166
|
+
* When the SSE factor is set to 0, the optimization will have no effect on the tileset.
|
|
29167
|
+
* </p>
|
|
29168
29168
|
*/
|
|
29169
29169
|
dynamicScreenSpaceErrorFactor: number;
|
|
29170
29170
|
/**
|
|
29171
29171
|
* A ratio of the tileset's height that determines "street level" for the {@link Cesium3DTileset#dynamicScreenSpaceError}
|
|
29172
|
-
|
|
29173
|
-
|
|
29174
|
-
|
|
29172
|
+
* optimization. When the camera is below this height, the dynamic screen space error optimization will have the maximum
|
|
29173
|
+
* effect, and it will roll off above this value. Valid values are between 0.0 and 1.0.
|
|
29174
|
+
* <p>
|
|
29175
29175
|
*/
|
|
29176
29176
|
dynamicScreenSpaceErrorHeightFalloff: number;
|
|
29177
29177
|
/**
|
|
29178
29178
|
* Determines whether the tileset casts or receives shadows from light sources.
|
|
29179
|
-
|
|
29180
|
-
|
|
29181
|
-
|
|
29182
|
-
|
|
29183
|
-
|
|
29184
|
-
|
|
29179
|
+
* <p>
|
|
29180
|
+
* Enabling shadows has a performance impact. A tileset that casts shadows must be rendered twice, once from the camera and again from the light's point of view.
|
|
29181
|
+
* </p>
|
|
29182
|
+
* <p>
|
|
29183
|
+
* Shadows are rendered only when {@link Viewer#shadows} is <code>true</code>.
|
|
29184
|
+
* </p>
|
|
29185
29185
|
*/
|
|
29186
29186
|
shadows: ShadowMode;
|
|
29187
29187
|
/**
|
|
@@ -29190,213 +29190,213 @@ export class Cesium3DTileset {
|
|
|
29190
29190
|
show: boolean;
|
|
29191
29191
|
/**
|
|
29192
29192
|
* Defines how per-feature colors set from the Cesium API or declarative styling blend with the source colors from
|
|
29193
|
-
|
|
29193
|
+
* the original feature, e.g. glTF material or per-point color in the tile.
|
|
29194
29194
|
*/
|
|
29195
29195
|
colorBlendMode: Cesium3DTileColorBlendMode;
|
|
29196
29196
|
/**
|
|
29197
29197
|
* Defines the value used to linearly interpolate between the source color and feature color when the {@link Cesium3DTileset#colorBlendMode} is <code>MIX</code>.
|
|
29198
|
-
|
|
29199
|
-
|
|
29198
|
+
* A value of 0.0 results in the source color while a value of 1.0 results in the feature color, with any value in-between
|
|
29199
|
+
* resulting in a mix of the source color and feature color.
|
|
29200
29200
|
*/
|
|
29201
29201
|
colorBlendAmount: number;
|
|
29202
29202
|
/**
|
|
29203
29203
|
* The event fired to indicate progress of loading new tiles. This event is fired when a new tile
|
|
29204
|
-
|
|
29205
|
-
|
|
29206
|
-
|
|
29207
|
-
|
|
29208
|
-
|
|
29209
|
-
|
|
29210
|
-
|
|
29211
|
-
|
|
29212
|
-
|
|
29204
|
+
* is requested, when a requested tile is finished downloading, and when a downloaded tile has been
|
|
29205
|
+
* processed and is ready to render.
|
|
29206
|
+
* <p>
|
|
29207
|
+
* The number of pending tile requests, <code>numberOfPendingRequests</code>, and number of tiles
|
|
29208
|
+
* processing, <code>numberOfTilesProcessing</code> are passed to the event listener.
|
|
29209
|
+
* </p>
|
|
29210
|
+
* <p>
|
|
29211
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29212
|
+
* </p>
|
|
29213
29213
|
* @example
|
|
29214
29214
|
* tileset.loadProgress.addEventListener(function(numberOfPendingRequests, numberOfTilesProcessing) {
|
|
29215
|
-
|
|
29216
|
-
|
|
29217
|
-
|
|
29218
|
-
|
|
29219
|
-
|
|
29220
|
-
|
|
29221
|
-
|
|
29215
|
+
* if ((numberOfPendingRequests === 0) && (numberOfTilesProcessing === 0)) {
|
|
29216
|
+
* console.log('Stopped loading');
|
|
29217
|
+
* return;
|
|
29218
|
+
* }
|
|
29219
|
+
*
|
|
29220
|
+
* console.log(`Loading: requests: ${numberOfPendingRequests}, processing: ${numberOfTilesProcessing}`);
|
|
29221
|
+
* });
|
|
29222
29222
|
*/
|
|
29223
29223
|
loadProgress: Event;
|
|
29224
29224
|
/**
|
|
29225
29225
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The tileset
|
|
29226
|
-
|
|
29227
|
-
|
|
29228
|
-
|
|
29229
|
-
|
|
29226
|
+
* is completely loaded for this view.
|
|
29227
|
+
* <p>
|
|
29228
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29229
|
+
* </p>
|
|
29230
29230
|
* @example
|
|
29231
29231
|
* tileset.allTilesLoaded.addEventListener(function() {
|
|
29232
|
-
|
|
29233
|
-
|
|
29232
|
+
* console.log('All tiles are loaded');
|
|
29233
|
+
* });
|
|
29234
29234
|
*/
|
|
29235
29235
|
allTilesLoaded: Event;
|
|
29236
29236
|
/**
|
|
29237
29237
|
* The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event
|
|
29238
|
-
|
|
29239
|
-
|
|
29240
|
-
|
|
29241
|
-
|
|
29238
|
+
* is fired once when all tiles in the initial view are loaded.
|
|
29239
|
+
* <p>
|
|
29240
|
+
* This event is fired at the end of the frame after the scene is rendered.
|
|
29241
|
+
* </p>
|
|
29242
29242
|
* @example
|
|
29243
29243
|
* tileset.initialTilesLoaded.addEventListener(function() {
|
|
29244
|
-
|
|
29245
|
-
|
|
29244
|
+
* console.log('Initial tiles are loaded');
|
|
29245
|
+
* });
|
|
29246
29246
|
*/
|
|
29247
29247
|
initialTilesLoaded: Event;
|
|
29248
29248
|
/**
|
|
29249
29249
|
* The event fired to indicate that a tile's content was loaded.
|
|
29250
|
-
|
|
29251
|
-
|
|
29252
|
-
|
|
29253
|
-
|
|
29254
|
-
|
|
29255
|
-
|
|
29256
|
-
|
|
29257
|
-
|
|
29250
|
+
* <p>
|
|
29251
|
+
* The loaded {@link Cesium3DTile} is passed to the event listener.
|
|
29252
|
+
* </p>
|
|
29253
|
+
* <p>
|
|
29254
|
+
* This event is fired during the tileset traversal while the frame is being rendered
|
|
29255
|
+
* so that updates to the tile take effect in the same frame. Do not create or modify
|
|
29256
|
+
* Cesium entities or primitives during the event listener.
|
|
29257
|
+
* </p>
|
|
29258
29258
|
* @example
|
|
29259
29259
|
* tileset.tileLoad.addEventListener(function(tile) {
|
|
29260
|
-
|
|
29261
|
-
|
|
29260
|
+
* console.log('A tile was loaded.');
|
|
29261
|
+
* });
|
|
29262
29262
|
*/
|
|
29263
29263
|
tileLoad: Event;
|
|
29264
29264
|
/**
|
|
29265
29265
|
* The event fired to indicate that a tile's content was unloaded.
|
|
29266
|
-
|
|
29267
|
-
|
|
29268
|
-
|
|
29269
|
-
|
|
29270
|
-
|
|
29271
|
-
|
|
29272
|
-
|
|
29273
|
-
|
|
29266
|
+
* <p>
|
|
29267
|
+
* The unloaded {@link Cesium3DTile} is passed to the event listener.
|
|
29268
|
+
* </p>
|
|
29269
|
+
* <p>
|
|
29270
|
+
* This event is fired immediately before the tile's content is unloaded while the frame is being
|
|
29271
|
+
* rendered so that the event listener has access to the tile's content. Do not create
|
|
29272
|
+
* or modify Cesium entities or primitives during the event listener.
|
|
29273
|
+
* </p>
|
|
29274
29274
|
* @example
|
|
29275
29275
|
* tileset.tileUnload.addEventListener(function(tile) {
|
|
29276
|
-
|
|
29277
|
-
|
|
29276
|
+
* console.log('A tile was unloaded from the cache.');
|
|
29277
|
+
* });
|
|
29278
29278
|
*/
|
|
29279
29279
|
tileUnload: Event;
|
|
29280
29280
|
/**
|
|
29281
29281
|
* The event fired to indicate that a tile's content failed to load.
|
|
29282
|
-
|
|
29283
|
-
|
|
29284
|
-
|
|
29285
|
-
|
|
29286
|
-
|
|
29287
|
-
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
|
|
29291
|
-
|
|
29292
|
-
|
|
29293
|
-
|
|
29282
|
+
* <p>
|
|
29283
|
+
* If there are no event listeners, error messages will be logged to the console.
|
|
29284
|
+
* </p>
|
|
29285
|
+
* <p>
|
|
29286
|
+
* The error object passed to the listener contains two properties:
|
|
29287
|
+
* <ul>
|
|
29288
|
+
* <li><code>url</code>: the url of the failed tile.</li>
|
|
29289
|
+
* <li><code>message</code>: the error message.</li>
|
|
29290
|
+
* </ul>
|
|
29291
|
+
* <p>
|
|
29292
|
+
* If multiple contents are present, this event is raised once per inner content with errors.
|
|
29293
|
+
* </p>
|
|
29294
29294
|
* @example
|
|
29295
29295
|
* tileset.tileFailed.addEventListener(function(error) {
|
|
29296
|
-
|
|
29297
|
-
|
|
29298
|
-
|
|
29296
|
+
* console.log(`An error occurred loading tile: ${error.url}`);
|
|
29297
|
+
* console.log(`Error: ${error.message}`);
|
|
29298
|
+
* });
|
|
29299
29299
|
*/
|
|
29300
29300
|
tileFailed: Event;
|
|
29301
29301
|
/**
|
|
29302
29302
|
* This event fires once for each visible tile in a frame. This can be used to manually
|
|
29303
|
-
|
|
29304
|
-
|
|
29305
|
-
|
|
29306
|
-
|
|
29307
|
-
|
|
29308
|
-
|
|
29309
|
-
|
|
29310
|
-
|
|
29311
|
-
|
|
29303
|
+
* style a tileset.
|
|
29304
|
+
* <p>
|
|
29305
|
+
* The visible {@link Cesium3DTile} is passed to the event listener.
|
|
29306
|
+
* </p>
|
|
29307
|
+
* <p>
|
|
29308
|
+
* This event is fired during the tileset traversal while the frame is being rendered
|
|
29309
|
+
* so that updates to the tile take effect in the same frame. Do not create or modify
|
|
29310
|
+
* Cesium entities or primitives during the event listener.
|
|
29311
|
+
* </p>
|
|
29312
29312
|
* @example
|
|
29313
29313
|
* tileset.tileVisible.addEventListener(function(tile) {
|
|
29314
|
-
|
|
29315
|
-
|
|
29316
|
-
|
|
29317
|
-
|
|
29314
|
+
* if (tile.content instanceof Cesium.Model3DTileContent) {
|
|
29315
|
+
* console.log('A 3D model tile is visible.');
|
|
29316
|
+
* }
|
|
29317
|
+
* });
|
|
29318
29318
|
* @example
|
|
29319
29319
|
* // Apply a red style and then manually set random colors for every other feature when the tile becomes visible.
|
|
29320
|
-
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
|
|
29326
|
-
|
|
29327
|
-
|
|
29328
|
-
|
|
29329
|
-
|
|
29320
|
+
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
29321
|
+
* color : 'color("red")'
|
|
29322
|
+
* });
|
|
29323
|
+
* tileset.tileVisible.addEventListener(function(tile) {
|
|
29324
|
+
* const content = tile.content;
|
|
29325
|
+
* const featuresLength = content.featuresLength;
|
|
29326
|
+
* for (let i = 0; i < featuresLength; i+=2) {
|
|
29327
|
+
* content.getFeature(i).color = Cesium.Color.fromRandom();
|
|
29328
|
+
* }
|
|
29329
|
+
* });
|
|
29330
29330
|
*/
|
|
29331
29331
|
tileVisible: Event;
|
|
29332
29332
|
/**
|
|
29333
29333
|
* Optimization option. Determines if level of detail skipping should be applied during the traversal.
|
|
29334
|
-
|
|
29335
|
-
|
|
29336
|
-
|
|
29337
|
-
|
|
29338
|
-
|
|
29339
|
-
|
|
29334
|
+
* <p>
|
|
29335
|
+
* The common strategy for replacement-refinement traversal is to store all levels of the tree in memory and require
|
|
29336
|
+
* all children to be loaded before the parent can refine. With this optimization levels of the tree can be skipped
|
|
29337
|
+
* entirely and children can be rendered alongside their parents. The tileset requires significantly less memory when
|
|
29338
|
+
* using this optimization.
|
|
29339
|
+
* </p>
|
|
29340
29340
|
*/
|
|
29341
29341
|
skipLevelOfDetail: boolean;
|
|
29342
29342
|
/**
|
|
29343
29343
|
* The screen space error that must be reached before skipping levels of detail.
|
|
29344
|
-
|
|
29345
|
-
|
|
29346
|
-
|
|
29344
|
+
* <p>
|
|
29345
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29346
|
+
* </p>
|
|
29347
29347
|
*/
|
|
29348
29348
|
baseScreenSpaceError: number;
|
|
29349
29349
|
/**
|
|
29350
29350
|
* Multiplier defining the minimum screen space error to skip.
|
|
29351
|
-
|
|
29352
|
-
|
|
29353
|
-
|
|
29354
|
-
|
|
29355
|
-
|
|
29351
|
+
* For example, if a tile has screen space error of 100, no tiles will be loaded unless they
|
|
29352
|
+
* are leaves or have a screen space error <code><= 100 / skipScreenSpaceErrorFactor</code>.
|
|
29353
|
+
* <p>
|
|
29354
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29355
|
+
* </p>
|
|
29356
29356
|
*/
|
|
29357
29357
|
skipScreenSpaceErrorFactor: number;
|
|
29358
29358
|
/**
|
|
29359
29359
|
* Constant defining the minimum number of levels to skip when loading tiles. When it is 0, no levels are skipped.
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
|
-
|
|
29363
|
-
|
|
29360
|
+
* For example, if a tile is level 1, no tiles will be loaded unless they are at level greater than 2.
|
|
29361
|
+
* <p>
|
|
29362
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29363
|
+
* </p>
|
|
29364
29364
|
*/
|
|
29365
29365
|
skipLevels: number;
|
|
29366
29366
|
/**
|
|
29367
29367
|
* When true, only tiles that meet the maximum screen space error will ever be downloaded.
|
|
29368
|
-
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29368
|
+
* Skipping factors are ignored and just the desired tiles are loaded.
|
|
29369
|
+
* <p>
|
|
29370
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29371
|
+
* </p>
|
|
29372
29372
|
*/
|
|
29373
29373
|
immediatelyLoadDesiredLevelOfDetail: boolean;
|
|
29374
29374
|
/**
|
|
29375
29375
|
* Determines whether siblings of visible tiles are always downloaded during traversal.
|
|
29376
|
-
|
|
29377
|
-
|
|
29378
|
-
|
|
29379
|
-
|
|
29376
|
+
* This may be useful for ensuring that tiles are already available when the viewer turns left/right.
|
|
29377
|
+
* <p>
|
|
29378
|
+
* Only used when {@link Cesium3DTileset#skipLevelOfDetail} is <code>true</code>.
|
|
29379
|
+
* </p>
|
|
29380
29380
|
*/
|
|
29381
29381
|
loadSiblings: boolean;
|
|
29382
29382
|
/**
|
|
29383
29383
|
* The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
|
|
29384
|
-
|
|
29385
|
-
|
|
29386
|
-
|
|
29387
|
-
|
|
29388
|
-
|
|
29384
|
+
* <p>
|
|
29385
|
+
* For example, disabling additional light sources by setting
|
|
29386
|
+
* <code>tileset.imageBasedLighting.imageBasedLightingFactor = new Cartesian2(0.0, 0.0)</code>
|
|
29387
|
+
* will make the tileset much darker. Here, increasing the intensity of the light source will make the tileset brighter.
|
|
29388
|
+
* </p>
|
|
29389
29389
|
*/
|
|
29390
29390
|
lightColor: Cartesian3;
|
|
29391
29391
|
/**
|
|
29392
29392
|
* Whether to cull back-facing geometry. When true, back face culling is determined
|
|
29393
|
-
|
|
29393
|
+
* by the glTF material's doubleSided property; when false, back face culling is disabled.
|
|
29394
29394
|
*/
|
|
29395
29395
|
backFaceCulling: boolean;
|
|
29396
29396
|
/**
|
|
29397
29397
|
* Whether to display the outline for models using the
|
|
29398
|
-
|
|
29399
|
-
|
|
29398
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline} extension.
|
|
29399
|
+
* When true, outlines are displayed. When false, outlines are not displayed.
|
|
29400
29400
|
*/
|
|
29401
29401
|
showOutline: boolean;
|
|
29402
29402
|
/**
|
|
@@ -29413,91 +29413,117 @@ 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
|
/**
|
|
29492
29492
|
* Function for examining vector lines as they are being streamed.
|
|
29493
29493
|
*/
|
|
29494
29494
|
examineVectorLinesFunction: (...params: any[]) => any;
|
|
29495
|
+
/**
|
|
29496
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
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
|
+
*/
|
|
29503
|
+
debugWireframeLineWidth: number;
|
|
29504
|
+
/**
|
|
29505
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
29506
|
+
* <p>
|
|
29507
|
+
* The mode to use when rendering the tileset in wireframe mode.
|
|
29508
|
+
* </p>
|
|
29509
|
+
*/
|
|
29510
|
+
debugWireframeMode: "lines" | "barycentric";
|
|
29511
|
+
/**
|
|
29512
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
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
|
+
*/
|
|
29520
|
+
debugWireframeOverlay: boolean;
|
|
29495
29521
|
/**
|
|
29496
29522
|
* Gets the tileset's asset object property, which contains metadata about the tileset.
|
|
29497
|
-
|
|
29498
|
-
|
|
29499
|
-
|
|
29500
|
-
|
|
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>
|
|
29501
29527
|
*/
|
|
29502
29528
|
readonly asset: any;
|
|
29503
29529
|
/**
|
|
@@ -29514,32 +29540,32 @@ export class Cesium3DTileset {
|
|
|
29514
29540
|
clippingPolygons: ClippingPolygonCollection;
|
|
29515
29541
|
/**
|
|
29516
29542
|
* The collection of <code>ImageryLayer</code> objects providing 2D georeferenced
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
|
|
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.
|
|
29520
29546
|
* @example
|
|
29521
29547
|
* // Drape Bing Maps Aerial imagery over the tileset
|
|
29522
|
-
|
|
29523
|
-
|
|
29524
|
-
|
|
29525
|
-
|
|
29526
|
-
|
|
29548
|
+
* const imageryProvider = await Cesium.createWorldImageryAsync({
|
|
29549
|
+
* style: Cesium.IonWorldImageryStyle.AERIAL,
|
|
29550
|
+
* });
|
|
29551
|
+
* const imageryLayer = new ImageryLayer(imageryProvider);
|
|
29552
|
+
* tileset.imageryLayers.add(imageryLayer);
|
|
29527
29553
|
*/
|
|
29528
29554
|
readonly imageryLayers: ImageryLayerCollection;
|
|
29529
29555
|
/**
|
|
29530
29556
|
* Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.
|
|
29531
|
-
|
|
29532
|
-
|
|
29533
|
-
|
|
29534
|
-
|
|
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>
|
|
29535
29561
|
* @example
|
|
29536
29562
|
* console.log(`Maximum building height: ${tileset.properties.height.maximum}`);
|
|
29537
|
-
|
|
29563
|
+
* console.log(`Minimum building height: ${tileset.properties.height.minimum}`);
|
|
29538
29564
|
*/
|
|
29539
29565
|
readonly properties: any;
|
|
29540
29566
|
/**
|
|
29541
29567
|
* When <code>true</code>, all tiles that meet the screen space error this frame are loaded. The tileset is
|
|
29542
|
-
|
|
29568
|
+
* completely loaded for this view.
|
|
29543
29569
|
*/
|
|
29544
29570
|
readonly tilesLoaded: boolean;
|
|
29545
29571
|
/**
|
|
@@ -29552,93 +29578,93 @@ export class Cesium3DTileset {
|
|
|
29552
29578
|
readonly basePath: string;
|
|
29553
29579
|
/**
|
|
29554
29580
|
* The style, defined using the
|
|
29555
|
-
|
|
29556
|
-
|
|
29557
|
-
|
|
29558
|
-
|
|
29559
|
-
|
|
29560
|
-
|
|
29561
|
-
|
|
29562
|
-
|
|
29563
|
-
|
|
29564
|
-
|
|
29565
|
-
|
|
29566
|
-
|
|
29567
|
-
|
|
29568
|
-
|
|
29569
|
-
|
|
29570
|
-
|
|
29571
|
-
|
|
29572
|
-
|
|
29573
|
-
|
|
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>
|
|
29574
29600
|
* @example
|
|
29575
29601
|
* tileset.style = new Cesium.Cesium3DTileStyle({
|
|
29576
|
-
|
|
29577
|
-
|
|
29578
|
-
|
|
29579
|
-
|
|
29580
|
-
|
|
29581
|
-
|
|
29582
|
-
|
|
29583
|
-
|
|
29584
|
-
|
|
29585
|
-
|
|
29586
|
-
|
|
29587
|
-
|
|
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
|
+
* });
|
|
29588
29614
|
*/
|
|
29589
29615
|
style: Cesium3DTileStyle | undefined;
|
|
29590
29616
|
/**
|
|
29591
29617
|
* A custom shader to apply to all tiles in the tileset. Only used for
|
|
29592
|
-
|
|
29593
|
-
|
|
29618
|
+
* contents that use {@link Model}. Using custom shaders with a
|
|
29619
|
+
* {@link Cesium3DTileStyle} may lead to undefined behavior.
|
|
29594
29620
|
*/
|
|
29595
29621
|
customShader: CustomShader | undefined;
|
|
29596
29622
|
/**
|
|
29597
29623
|
* The maximum screen space error used to drive level of detail refinement. This value helps determine when a tile
|
|
29598
|
-
|
|
29599
|
-
|
|
29600
|
-
|
|
29601
|
-
|
|
29602
|
-
|
|
29603
|
-
|
|
29604
|
-
|
|
29605
|
-
|
|
29606
|
-
|
|
29607
|
-
|
|
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>
|
|
29608
29634
|
*/
|
|
29609
29635
|
maximumScreenSpaceError: number;
|
|
29610
29636
|
/**
|
|
29611
29637
|
* The amount of GPU memory (in bytes) used to cache tiles. This memory usage is estimated from
|
|
29612
|
-
|
|
29613
|
-
|
|
29614
|
-
|
|
29615
|
-
|
|
29616
|
-
|
|
29617
|
-
|
|
29618
|
-
|
|
29619
|
-
|
|
29620
|
-
|
|
29621
|
-
|
|
29622
|
-
|
|
29623
|
-
|
|
29624
|
-
|
|
29625
|
-
|
|
29626
|
-
|
|
29627
|
-
|
|
29628
|
-
|
|
29629
|
-
|
|
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>
|
|
29630
29656
|
*/
|
|
29631
29657
|
cacheBytes: number;
|
|
29632
29658
|
/**
|
|
29633
29659
|
* The maximum additional amount of GPU memory (in bytes) that will be used to cache tiles.
|
|
29634
|
-
|
|
29635
|
-
|
|
29636
|
-
|
|
29637
|
-
|
|
29638
|
-
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
|
|
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>
|
|
29642
29668
|
*/
|
|
29643
29669
|
maximumCacheOverflowBytes: number;
|
|
29644
29670
|
/**
|
|
@@ -29653,24 +29679,24 @@ export class Cesium3DTileset {
|
|
|
29653
29679
|
* The tileset's bounding sphere.
|
|
29654
29680
|
* @example
|
|
29655
29681
|
* const tileset = await Cesium.Cesium3DTileset.fromUrl("http://localhost:8002/tilesets/Seattle/tileset.json");
|
|
29656
|
-
|
|
29657
|
-
|
|
29658
|
-
|
|
29659
|
-
|
|
29660
|
-
|
|
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));
|
|
29661
29687
|
*/
|
|
29662
29688
|
readonly boundingSphere: BoundingSphere;
|
|
29663
29689
|
/**
|
|
29664
29690
|
* A 4x4 transformation matrix that transforms the entire tileset.
|
|
29665
29691
|
* @example
|
|
29666
29692
|
* // Adjust a tileset's height from the globe's surface.
|
|
29667
|
-
|
|
29668
|
-
|
|
29669
|
-
|
|
29670
|
-
|
|
29671
|
-
|
|
29672
|
-
|
|
29673
|
-
|
|
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);
|
|
29674
29700
|
*/
|
|
29675
29701
|
modelMatrix: Matrix4;
|
|
29676
29702
|
/**
|
|
@@ -29679,45 +29705,45 @@ export class Cesium3DTileset {
|
|
|
29679
29705
|
readonly timeSinceLoad: number;
|
|
29680
29706
|
/**
|
|
29681
29707
|
* The total amount of GPU memory in bytes used by the tileset. This value is estimated from
|
|
29682
|
-
|
|
29708
|
+
* geometry, texture, batch table textures, and binary metadata of loaded tiles.
|
|
29683
29709
|
*/
|
|
29684
29710
|
readonly totalMemoryUsageInBytes: number;
|
|
29685
29711
|
/**
|
|
29686
29712
|
* Determines whether terrain, 3D Tiles, or both will be classified by this tileset.
|
|
29687
|
-
|
|
29688
|
-
|
|
29689
|
-
|
|
29690
|
-
|
|
29691
|
-
|
|
29692
|
-
|
|
29693
|
-
|
|
29694
|
-
|
|
29695
|
-
|
|
29696
|
-
|
|
29697
|
-
|
|
29698
|
-
|
|
29699
|
-
|
|
29700
|
-
|
|
29701
|
-
|
|
29702
|
-
|
|
29703
|
-
|
|
29704
|
-
|
|
29705
|
-
|
|
29706
|
-
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
|
|
29711
|
-
|
|
29712
|
-
|
|
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>
|
|
29713
29739
|
*/
|
|
29714
29740
|
readonly classificationType: ClassificationType;
|
|
29715
29741
|
/**
|
|
29716
29742
|
* Specifies if the height is relative to terrain, 3D Tiles, or both.
|
|
29717
|
-
|
|
29718
|
-
|
|
29719
|
-
|
|
29720
|
-
|
|
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>
|
|
29721
29747
|
*/
|
|
29722
29748
|
readonly heightReference: HeightReference | undefined;
|
|
29723
29749
|
/**
|
|
@@ -29726,18 +29752,18 @@ export class Cesium3DTileset {
|
|
|
29726
29752
|
readonly ellipsoid: Ellipsoid;
|
|
29727
29753
|
/**
|
|
29728
29754
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the cone size that determines which tiles are deferred.
|
|
29729
|
-
|
|
29730
|
-
|
|
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.
|
|
29731
29757
|
*/
|
|
29732
29758
|
foveatedConeSize: number;
|
|
29733
29759
|
/**
|
|
29734
29760
|
* Optimization option. Used when {@link Cesium3DTileset#foveatedScreenSpaceError} is true to control the starting screen space error relaxation for tiles outside the foveated cone.
|
|
29735
|
-
|
|
29761
|
+
* The screen space error will be raised starting with this value up to {@link Cesium3DTileset#maximumScreenSpaceError} based on the provided {@link Cesium3DTileset#foveatedInterpolationCallback}.
|
|
29736
29762
|
*/
|
|
29737
29763
|
foveatedMinimumScreenSpaceErrorRelaxation: number;
|
|
29738
29764
|
/**
|
|
29739
29765
|
* Returns the <code>extras</code> property at the top-level of the tileset JSON, which contains application specific metadata.
|
|
29740
|
-
|
|
29766
|
+
* Returns <code>undefined</code> if <code>extras</code> does not exist.
|
|
29741
29767
|
*/
|
|
29742
29768
|
readonly extras: any;
|
|
29743
29769
|
/**
|
|
@@ -29748,8 +29774,8 @@ export class Cesium3DTileset {
|
|
|
29748
29774
|
* The properties for managing dynamic environment maps on this model. Affects lighting.
|
|
29749
29775
|
* @example
|
|
29750
29776
|
* // Change the ground color used for a tileset's environment map to a forest green
|
|
29751
|
-
|
|
29752
|
-
|
|
29777
|
+
* const environmentMapManager = tileset.environmentMapManager;
|
|
29778
|
+
* environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
|
|
29753
29779
|
*/
|
|
29754
29780
|
readonly environmentMapManager: DynamicEnvironmentMapManager;
|
|
29755
29781
|
/**
|
|
@@ -29758,7 +29784,7 @@ export class Cesium3DTileset {
|
|
|
29758
29784
|
vectorClassificationOnly: boolean;
|
|
29759
29785
|
/**
|
|
29760
29786
|
* Whether vector tiles should keep decoded positions in memory.
|
|
29761
|
-
|
|
29787
|
+
* This is used with {@link Cesium3DTileFeature.getPolylinePositions}.
|
|
29762
29788
|
*/
|
|
29763
29789
|
vectorKeepDecodedPositions: boolean;
|
|
29764
29790
|
/**
|
|
@@ -29767,106 +29793,106 @@ export class Cesium3DTileset {
|
|
|
29767
29793
|
showCreditsOnScreen: boolean;
|
|
29768
29794
|
/**
|
|
29769
29795
|
* Label of the feature ID set to use for picking and styling.
|
|
29770
|
-
|
|
29771
|
-
|
|
29772
|
-
|
|
29773
|
-
|
|
29774
|
-
|
|
29775
|
-
|
|
29776
|
-
|
|
29777
|
-
|
|
29778
|
-
|
|
29779
|
-
|
|
29780
|
-
|
|
29781
|
-
|
|
29782
|
-
|
|
29783
|
-
|
|
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>
|
|
29784
29810
|
*/
|
|
29785
29811
|
featureIdLabel: string;
|
|
29786
29812
|
/**
|
|
29787
29813
|
* Label of the instance feature ID set used for picking and styling.
|
|
29788
|
-
|
|
29789
|
-
|
|
29790
|
-
|
|
29791
|
-
|
|
29792
|
-
|
|
29793
|
-
|
|
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>
|
|
29794
29820
|
*/
|
|
29795
29821
|
instanceFeatureIdLabel: string;
|
|
29796
29822
|
/**
|
|
29797
29823
|
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29798
|
-
|
|
29824
|
+
* used for streaming massive heterogeneous 3D geospatial datasets, from a Cesium ion asset ID.
|
|
29799
29825
|
* @example
|
|
29800
29826
|
* // Load a Cesium3DTileset with a Cesium ion asset ID of 124624234
|
|
29801
|
-
|
|
29802
|
-
|
|
29803
|
-
|
|
29804
|
-
|
|
29805
|
-
|
|
29806
|
-
|
|
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
|
+
* }
|
|
29807
29833
|
* @param assetId - The Cesium ion asset id.
|
|
29808
29834
|
* @param [options] - An object describing initialization options
|
|
29809
29835
|
*/
|
|
29810
29836
|
static fromIonAssetId(assetId: number, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset>;
|
|
29811
29837
|
/**
|
|
29812
29838
|
* Creates a {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification|3D Tiles tileset},
|
|
29813
|
-
|
|
29839
|
+
* used for streaming massive heterogeneous 3D geospatial datasets.
|
|
29814
29840
|
* @example
|
|
29815
29841
|
* try {
|
|
29816
|
-
|
|
29817
|
-
|
|
29818
|
-
|
|
29819
|
-
|
|
29820
|
-
|
|
29821
|
-
|
|
29822
|
-
|
|
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
|
+
* }
|
|
29823
29849
|
* @example
|
|
29824
29850
|
* // Common setting for the skipLevelOfDetail optimization
|
|
29825
|
-
|
|
29826
|
-
|
|
29827
|
-
|
|
29828
|
-
|
|
29829
|
-
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
|
|
29835
|
-
|
|
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);
|
|
29836
29862
|
* @example
|
|
29837
29863
|
* // Common settings for the dynamicScreenSpaceError optimization
|
|
29838
|
-
|
|
29839
|
-
|
|
29840
|
-
|
|
29841
|
-
|
|
29842
|
-
|
|
29843
|
-
|
|
29844
|
-
|
|
29845
|
-
|
|
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);
|
|
29846
29872
|
* @param url - The url to a tileset JSON file.
|
|
29847
29873
|
* @param [options] - An object describing initialization options
|
|
29848
29874
|
*/
|
|
29849
29875
|
static fromUrl(url: Resource | string, options?: Cesium3DTileset.ConstructorOptions): Promise<Cesium3DTileset>;
|
|
29850
29876
|
/**
|
|
29851
29877
|
* Provides a hook to override the method used to request the tileset json
|
|
29852
|
-
|
|
29878
|
+
* useful when fetching tilesets from remote servers
|
|
29853
29879
|
* @param tilesetUrl - The url of the json file to be fetched
|
|
29854
29880
|
* @returns A promise that resolves with the fetched json data
|
|
29855
29881
|
*/
|
|
29856
29882
|
static loadJson(tilesetUrl: Resource | string): Promise<object>;
|
|
29857
29883
|
/**
|
|
29858
29884
|
* Marks the tileset's {@link Cesium3DTileset#style} as dirty, which forces all
|
|
29859
|
-
|
|
29885
|
+
* features to re-evaluate the style in the next frame each is visible.
|
|
29860
29886
|
*/
|
|
29861
29887
|
makeStyleDirty(): void;
|
|
29862
29888
|
/**
|
|
29863
29889
|
* Unloads all tiles that weren't selected the previous frame. This can be used to
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
|
|
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>
|
|
29870
29896
|
*/
|
|
29871
29897
|
trimLoadedTiles(): void;
|
|
29872
29898
|
/**
|
|
@@ -29877,19 +29903,19 @@ export class Cesium3DTileset {
|
|
|
29877
29903
|
hasExtension(extensionName: string): boolean;
|
|
29878
29904
|
/**
|
|
29879
29905
|
* Returns true if this object was destroyed; otherwise, false.
|
|
29880
|
-
|
|
29881
|
-
|
|
29882
|
-
|
|
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.
|
|
29883
29909
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
29884
29910
|
*/
|
|
29885
29911
|
isDestroyed(): boolean;
|
|
29886
29912
|
/**
|
|
29887
29913
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
29888
|
-
|
|
29889
|
-
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
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.
|
|
29893
29919
|
* @example
|
|
29894
29920
|
* tileset = tileset && tileset.destroy();
|
|
29895
29921
|
*/
|
|
@@ -29898,14 +29924,75 @@ export class Cesium3DTileset {
|
|
|
29898
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.
|
|
29899
29925
|
* @example
|
|
29900
29926
|
* const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(124624234);
|
|
29901
|
-
|
|
29902
|
-
|
|
29903
|
-
|
|
29927
|
+
* scene.primitives.add(tileset);
|
|
29928
|
+
*
|
|
29929
|
+
* const height = tileset.getHeight(scene.camera.positionCartographic, scene);
|
|
29904
29930
|
* @param cartographic - The cartographic for which to find the height.
|
|
29905
29931
|
* @param scene - The scene where visualization is taking place.
|
|
29906
29932
|
* @returns The height of the cartographic or undefined if it could not be found.
|
|
29907
29933
|
*/
|
|
29908
29934
|
getHeight(cartographic: Cartographic, scene: Scene): number | undefined;
|
|
29935
|
+
/**
|
|
29936
|
+
* Displays the tileset in wireframe mode.
|
|
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
|
+
* @param [options] - Optional parameters for wireframe display
|
|
29946
|
+
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
29947
|
+
* @param [options.fillColor] - The fill color of the tileset when in wireframe mode. If undefined, the tileset's original material/color is preserved.
|
|
29948
|
+
* @param [options.fillAlpha = 0.2] - The alpha value of the fill color. Only applies when fillColor is specified.
|
|
29949
|
+
* @param [options.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE] - How the fill color blends with features. Only applies when fillColor is specified.
|
|
29950
|
+
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
29951
|
+
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the tileset's original material (only applies to barycentric mode)
|
|
29952
|
+
* @returns This tileset instance, to allow chaining of method calls.
|
|
29953
|
+
*/
|
|
29954
|
+
showWireframe(options?: {
|
|
29955
|
+
color?: Color;
|
|
29956
|
+
fillColor?: Color;
|
|
29957
|
+
fillAlpha?: number;
|
|
29958
|
+
colorBlendMode?: Cesium3DTileColorBlendMode;
|
|
29959
|
+
mode?: "lines" | "barycentric";
|
|
29960
|
+
overlay?: boolean;
|
|
29961
|
+
}): Cesium3DTileset;
|
|
29962
|
+
/**
|
|
29963
|
+
* Hides the tileset's wireframe, restoring it to normal rendering mode.
|
|
29964
|
+
* <p>
|
|
29965
|
+
* Only affects this tileset; other tilesets in the scene remain unchanged.
|
|
29966
|
+
* </p>
|
|
29967
|
+
* @returns This tileset instance, to allow chaining of method calls.
|
|
29968
|
+
*/
|
|
29969
|
+
hideWireframe(): Cesium3DTileset;
|
|
29970
|
+
/**
|
|
29971
|
+
* Toggles the tileset's wireframe display state.
|
|
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
|
+
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
29983
|
+
* @param [options.color = Color.WHITE] - A color to apply to all features
|
|
29984
|
+
* @param [options.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE] - How the color blends with features
|
|
29985
|
+
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
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
|
+
* @returns <code>true</code> if the tileset is now displayed in
|
|
29988
|
+
* wireframe mode, <code>false</code> if it is in normal mode.
|
|
29989
|
+
*/
|
|
29990
|
+
toggleWireframe(options?: {
|
|
29991
|
+
color?: Color;
|
|
29992
|
+
colorBlendMode?: Cesium3DTileColorBlendMode;
|
|
29993
|
+
mode?: "lines" | "barycentric";
|
|
29994
|
+
overlay?: boolean;
|
|
29995
|
+
}): boolean;
|
|
29909
29996
|
}
|
|
29910
29997
|
|
|
29911
29998
|
/**
|
|
@@ -38488,96 +38575,96 @@ export enum LightingModel {
|
|
|
38488
38575
|
|
|
38489
38576
|
/**
|
|
38490
38577
|
* <div class="notice">
|
|
38491
|
-
To construct a Model, call {@link Model.fromGltfAsync}. Do not call the constructor directly.
|
|
38492
|
-
</div>
|
|
38493
|
-
A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
38494
|
-
<p>
|
|
38495
|
-
Cesium supports glTF assets with the following extensions:
|
|
38496
|
-
<ul>
|
|
38497
|
-
<li>
|
|
38498
|
-
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
38499
|
-
</li>
|
|
38500
|
-
<li>
|
|
38501
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
|
|
38502
|
-
</li>
|
|
38503
|
-
<li>
|
|
38504
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
|
|
38505
|
-
</li>
|
|
38506
|
-
<li>
|
|
38507
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
|
|
38508
|
-
</li>
|
|
38509
|
-
<li>
|
|
38510
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
|
|
38511
|
-
</li>
|
|
38512
|
-
<li>
|
|
38513
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
38514
|
-
</li>
|
|
38515
|
-
<li>
|
|
38516
|
-
{@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
|
|
38517
|
-
</li>
|
|
38518
|
-
<li>
|
|
38519
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
|
|
38520
|
-
</li>
|
|
38521
|
-
<li>
|
|
38522
|
-
{@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
|
|
38523
|
-
</li>
|
|
38524
|
-
<li>
|
|
38525
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
|
|
38526
|
-
</li>
|
|
38527
|
-
<li>
|
|
38528
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
38529
|
-
</li>
|
|
38530
|
-
<li>
|
|
38531
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
38532
|
-
</li>
|
|
38533
|
-
<li>
|
|
38534
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
|
|
38535
|
-
</li>
|
|
38536
|
-
<li>
|
|
38537
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
|
|
38538
|
-
</li>
|
|
38539
|
-
<li>
|
|
38540
|
-
{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
38541
|
-
</li>
|
|
38542
|
-
<li>
|
|
38543
|
-
{@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
38544
|
-
</li>
|
|
38545
|
-
<li>
|
|
38546
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
38547
|
-
</li>
|
|
38548
|
-
<li>
|
|
38549
|
-
{@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
38550
|
-
</li>
|
|
38551
|
-
<li>
|
|
38552
|
-
{@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
|
|
38553
|
-
</li>
|
|
38554
|
-
<li>
|
|
38555
|
-
{@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local (experimental)}
|
|
38556
|
-
</li>
|
|
38557
|
-
</ul>
|
|
38558
|
-
</p>
|
|
38559
|
-
<p>
|
|
38560
|
-
Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
|
|
38561
|
-
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})
|
|
38562
|
-
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}).
|
|
38563
|
-
</p>
|
|
38578
|
+
* To construct a Model, call {@link Model.fromGltfAsync}. Do not call the constructor directly.
|
|
38579
|
+
* </div>
|
|
38580
|
+
* A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
|
38581
|
+
* <p>
|
|
38582
|
+
* Cesium supports glTF assets with the following extensions:
|
|
38583
|
+
* <ul>
|
|
38584
|
+
* <li>
|
|
38585
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
38586
|
+
* </li>
|
|
38587
|
+
* <li>
|
|
38588
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
|
|
38589
|
+
* </li>
|
|
38590
|
+
* <li>
|
|
38591
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
|
|
38592
|
+
* </li>
|
|
38593
|
+
* <li>
|
|
38594
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
|
|
38595
|
+
* </li>
|
|
38596
|
+
* <li>
|
|
38597
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
|
|
38598
|
+
* </li>
|
|
38599
|
+
* <li>
|
|
38600
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
38601
|
+
* </li>
|
|
38602
|
+
* <li>
|
|
38603
|
+
* {@link https://github.com/KhronosGroup/glTF/pull/2514|EXT_mesh_primitive_restart}
|
|
38604
|
+
* </li>
|
|
38605
|
+
* <li>
|
|
38606
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
|
|
38607
|
+
* </li>
|
|
38608
|
+
* <li>
|
|
38609
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
|
|
38610
|
+
* </li>
|
|
38611
|
+
* <li>
|
|
38612
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
|
|
38613
|
+
* </li>
|
|
38614
|
+
* <li>
|
|
38615
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
38616
|
+
* </li>
|
|
38617
|
+
* <li>
|
|
38618
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
38619
|
+
* </li>
|
|
38620
|
+
* <li>
|
|
38621
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
|
|
38622
|
+
* </li>
|
|
38623
|
+
* <li>
|
|
38624
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
|
|
38625
|
+
* </li>
|
|
38626
|
+
* <li>
|
|
38627
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
38628
|
+
* </li>
|
|
38629
|
+
* <li>
|
|
38630
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
38631
|
+
* </li>
|
|
38632
|
+
* <li>
|
|
38633
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
38634
|
+
* </li>
|
|
38635
|
+
* <li>
|
|
38636
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
38637
|
+
* </li>
|
|
38638
|
+
* <li>
|
|
38639
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
|
|
38640
|
+
* </li>
|
|
38641
|
+
* <li>
|
|
38642
|
+
* {@link https://nsgreg.nga.mil/csmwg.jsp|NGA_gpm_local (experimental)}
|
|
38643
|
+
* </li>
|
|
38644
|
+
* </ul>
|
|
38645
|
+
* </p>
|
|
38646
|
+
* <p>
|
|
38647
|
+
* Note: for models with compressed textures using the KHR_texture_basisu extension, we recommend power of 2 textures in both dimensions
|
|
38648
|
+
* for maximum compatibility. This is because some samplers require power of 2 textures ({@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Using_textures_in_WebGL|Using textures in WebGL})
|
|
38649
|
+
* and KHR_texture_basisu requires multiple of 4 dimensions ({@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu/README.md#additional-requirements|KHR_texture_basisu additional requirements}).
|
|
38650
|
+
* </p>
|
|
38564
38651
|
*/
|
|
38565
38652
|
export class Model {
|
|
38566
38653
|
constructor();
|
|
38567
38654
|
/**
|
|
38568
38655
|
* The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
|
38569
|
-
|
|
38570
|
-
|
|
38571
|
-
|
|
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}.
|
|
38572
38659
|
* @example
|
|
38573
38660
|
* const origin = Cesium.Cartesian3.fromDegrees(-95.0, 40.0, 200000.0);
|
|
38574
|
-
|
|
38661
|
+
* m.modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(origin);
|
|
38575
38662
|
*/
|
|
38576
38663
|
modelMatrix: Matrix4;
|
|
38577
38664
|
/**
|
|
38578
38665
|
* Whether to display the outline for models using the
|
|
38579
|
-
|
|
38580
|
-
|
|
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.
|
|
38581
38668
|
*/
|
|
38582
38669
|
showOutline: boolean;
|
|
38583
38670
|
/**
|
|
@@ -38586,29 +38673,29 @@ export class Model {
|
|
|
38586
38673
|
outlineColor: Color;
|
|
38587
38674
|
/**
|
|
38588
38675
|
* When <code>true</code>, this model is ready to render, i.e., the external binary, image,
|
|
38589
|
-
|
|
38676
|
+
* and shader files were downloaded and the WebGL resources were created.
|
|
38590
38677
|
*/
|
|
38591
38678
|
readonly ready: boolean;
|
|
38592
38679
|
/**
|
|
38593
38680
|
* Gets an event that is raised when the model encounters an asynchronous rendering error. By subscribing
|
|
38594
|
-
|
|
38595
|
-
|
|
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}.
|
|
38596
38683
|
*/
|
|
38597
38684
|
readonly errorEvent: Event;
|
|
38598
38685
|
/**
|
|
38599
38686
|
* Gets an event that is raised when the model is loaded and ready for rendering, i.e. when the external resources
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38605
|
-
|
|
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>
|
|
38606
38693
|
*/
|
|
38607
38694
|
readonly readyEvent: Event;
|
|
38608
38695
|
/**
|
|
38609
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
|
|
38610
|
-
|
|
38611
|
-
|
|
38697
|
+
* have been downloaded and the WebGL resources are created. Event listeners
|
|
38698
|
+
* are passed an instance of the {@link Model}.
|
|
38612
38699
|
*/
|
|
38613
38700
|
readonly texturesReadyEvent: Event;
|
|
38614
38701
|
/**
|
|
@@ -38621,23 +38708,23 @@ export class Model {
|
|
|
38621
38708
|
clampAnimations: boolean;
|
|
38622
38709
|
/**
|
|
38623
38710
|
* Point cloud shading settings for controlling point cloud attenuation
|
|
38624
|
-
|
|
38625
|
-
|
|
38711
|
+
* and lighting. For 3D Tiles, this is inherited from the
|
|
38712
|
+
* {@link Cesium3DTileset}.
|
|
38626
38713
|
*/
|
|
38627
38714
|
pointCloudShading: PointCloudShading;
|
|
38628
38715
|
/**
|
|
38629
38716
|
* The model's custom shader, if it exists. Using custom shaders with a {@link Cesium3DTileStyle}
|
|
38630
|
-
|
|
38717
|
+
* may lead to undefined behavior.
|
|
38631
38718
|
*/
|
|
38632
38719
|
customShader: CustomShader;
|
|
38633
38720
|
/**
|
|
38634
38721
|
* The height reference of the model, which determines how the model is drawn
|
|
38635
|
-
|
|
38722
|
+
* relative to terrain.
|
|
38636
38723
|
*/
|
|
38637
38724
|
heightReference: HeightReference;
|
|
38638
38725
|
/**
|
|
38639
38726
|
* Gets or sets the distance display condition, which specifies at what distance
|
|
38640
|
-
|
|
38727
|
+
* from the camera this model will be displayed.
|
|
38641
38728
|
*/
|
|
38642
38729
|
distanceDisplayCondition: DistanceDisplayCondition;
|
|
38643
38730
|
/**
|
|
@@ -38670,54 +38757,98 @@ export class Model {
|
|
|
38670
38757
|
silhouetteSize: number;
|
|
38671
38758
|
/**
|
|
38672
38759
|
* Gets the model's bounding sphere in world space. This does not take into account
|
|
38673
|
-
|
|
38674
|
-
|
|
38760
|
+
* glTF animations, skins, or morph targets. It also does not account for
|
|
38761
|
+
* {@link Model#minimumPixelSize}.
|
|
38675
38762
|
*/
|
|
38676
38763
|
readonly boundingSphere: BoundingSphere;
|
|
38677
38764
|
/**
|
|
38678
38765
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38679
|
-
|
|
38680
|
-
|
|
38681
|
-
|
|
38766
|
+
* <p>
|
|
38767
|
+
* Draws the bounding sphere for each draw command in the model.
|
|
38768
|
+
* </p>
|
|
38682
38769
|
*/
|
|
38683
38770
|
debugShowBoundingVolume: boolean;
|
|
38684
38771
|
/**
|
|
38685
38772
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
38686
|
-
|
|
38687
|
-
|
|
38688
|
-
|
|
38773
|
+
* <p>
|
|
38774
|
+
* Draws the model in wireframe.
|
|
38775
|
+
* </p>
|
|
38689
38776
|
*/
|
|
38690
38777
|
debugWireframe: boolean;
|
|
38778
|
+
/**
|
|
38779
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38780
|
+
* <p>
|
|
38781
|
+
* The color of the wireframe edges. Only applies when
|
|
38782
|
+
* <code>debugWireframeMode</code> is set to "barycentric".
|
|
38783
|
+
* </p>
|
|
38784
|
+
*/
|
|
38785
|
+
debugWireframeColor: Color;
|
|
38786
|
+
/**
|
|
38787
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38788
|
+
* <p>
|
|
38789
|
+
* The alpha value of the model's fill color when rendering in barycentric
|
|
38790
|
+
* wireframe mode. A value of 0.0 makes the fill fully transparent, showing
|
|
38791
|
+
* only the wireframe edges. A value of 1.0 makes the fill fully opaque.
|
|
38792
|
+
* Only applies when <code>debugWireframeMode</code> is set to "barycentric".
|
|
38793
|
+
* </p>
|
|
38794
|
+
*/
|
|
38795
|
+
debugWireframeFillAlpha: number;
|
|
38796
|
+
/**
|
|
38797
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38798
|
+
* <p>
|
|
38799
|
+
* The line width to use when rendering the model in wireframe mode.
|
|
38800
|
+
* This only applies when <code>debugWireframeMode</code> is set to "barycentric".
|
|
38801
|
+
* For "lines" mode, the line width is limited by the browser's WebGL implementation.
|
|
38802
|
+
* </p>
|
|
38803
|
+
*/
|
|
38804
|
+
debugWireframeLineWidth: number;
|
|
38805
|
+
/**
|
|
38806
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
38807
|
+
* <p>
|
|
38808
|
+
* The mode to use when rendering the model in wireframe mode.
|
|
38809
|
+
* </p>
|
|
38810
|
+
*/
|
|
38811
|
+
debugWireframeMode: "lines" | "barycentric";
|
|
38812
|
+
/**
|
|
38813
|
+
* This property is for debugging only; it is not optimized for production use.
|
|
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
|
+
*/
|
|
38821
|
+
debugWireframeOverlay: boolean;
|
|
38691
38822
|
/**
|
|
38692
38823
|
* Whether or not to render the model.
|
|
38693
38824
|
*/
|
|
38694
38825
|
show: boolean;
|
|
38695
38826
|
/**
|
|
38696
38827
|
* Label of the feature ID set to use for picking and styling.
|
|
38697
|
-
|
|
38698
|
-
|
|
38699
|
-
|
|
38700
|
-
|
|
38701
|
-
|
|
38702
|
-
|
|
38703
|
-
|
|
38704
|
-
|
|
38705
|
-
|
|
38706
|
-
|
|
38707
|
-
|
|
38708
|
-
|
|
38709
|
-
|
|
38710
|
-
|
|
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>
|
|
38711
38842
|
*/
|
|
38712
38843
|
featureIdLabel: string;
|
|
38713
38844
|
/**
|
|
38714
38845
|
* Label of the instance feature ID set used for picking and styling.
|
|
38715
|
-
|
|
38716
|
-
|
|
38717
|
-
|
|
38718
|
-
|
|
38719
|
-
|
|
38720
|
-
|
|
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>
|
|
38721
38852
|
*/
|
|
38722
38853
|
instanceFeatureIdLabel: string;
|
|
38723
38854
|
/**
|
|
@@ -38732,17 +38863,17 @@ export class Model {
|
|
|
38732
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>.
|
|
38733
38864
|
* @example
|
|
38734
38865
|
* // Exaggerate terrain by a factor of 2, but prevent model exaggeration
|
|
38735
|
-
|
|
38736
|
-
|
|
38866
|
+
* scene.verticalExaggeration = 2.0;
|
|
38867
|
+
* model.enableVerticalExaggeration = false;
|
|
38737
38868
|
*/
|
|
38738
38869
|
enableVerticalExaggeration: boolean;
|
|
38739
38870
|
/**
|
|
38740
38871
|
* The directional light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
|
38741
|
-
|
|
38742
|
-
|
|
38743
|
-
|
|
38744
|
-
|
|
38745
|
-
|
|
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>
|
|
38746
38877
|
*/
|
|
38747
38878
|
lightColor: Cartesian3;
|
|
38748
38879
|
/**
|
|
@@ -38753,33 +38884,33 @@ export class Model {
|
|
|
38753
38884
|
* The properties for managing dynamic environment maps on this model. Affects lighting.
|
|
38754
38885
|
* @example
|
|
38755
38886
|
* // Change the ground color used for a model's environment map to a forest green
|
|
38756
|
-
|
|
38757
|
-
|
|
38887
|
+
* const environmentMapManager = model.environmentMapManager;
|
|
38888
|
+
* environmentMapManager.groundColor = Cesium.Color.fromCssColorString("#203b34");
|
|
38758
38889
|
*/
|
|
38759
38890
|
readonly environmentMapManager: DynamicEnvironmentMapManager;
|
|
38760
38891
|
/**
|
|
38761
38892
|
* Whether to cull back-facing geometry. When true, back face culling is
|
|
38762
|
-
|
|
38763
|
-
|
|
38764
|
-
|
|
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.
|
|
38765
38896
|
*/
|
|
38766
38897
|
backFaceCulling: boolean;
|
|
38767
38898
|
/**
|
|
38768
38899
|
* A uniform scale applied to this model before the {@link Model#modelMatrix}.
|
|
38769
|
-
|
|
38770
|
-
|
|
38900
|
+
* Values greater than <code>1.0</code> increase the size of the model; values
|
|
38901
|
+
* less than <code>1.0</code> decrease.
|
|
38771
38902
|
*/
|
|
38772
38903
|
scale: number;
|
|
38773
38904
|
/**
|
|
38774
38905
|
* The approximate minimum pixel size of the model regardless of zoom.
|
|
38775
|
-
|
|
38776
|
-
|
|
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.
|
|
38777
38908
|
*/
|
|
38778
38909
|
minimumPixelSize: number;
|
|
38779
38910
|
/**
|
|
38780
38911
|
* The maximum scale size for a model. This can be used to give
|
|
38781
|
-
|
|
38782
|
-
|
|
38912
|
+
* an upper limit to the {@link Model#minimumPixelSize}, ensuring that the model
|
|
38913
|
+
* is never an unreasonable scale.
|
|
38783
38914
|
*/
|
|
38784
38915
|
maximumScale: number;
|
|
38785
38916
|
/**
|
|
@@ -38792,7 +38923,7 @@ export class Model {
|
|
|
38792
38923
|
readonly credit: Credit;
|
|
38793
38924
|
/**
|
|
38794
38925
|
* Gets or sets whether the credits of the model will be displayed
|
|
38795
|
-
|
|
38926
|
+
* on the screen.
|
|
38796
38927
|
*/
|
|
38797
38928
|
showCreditsOnScreen: boolean;
|
|
38798
38929
|
/**
|
|
@@ -38801,161 +38932,224 @@ export class Model {
|
|
|
38801
38932
|
splitDirection: SplitDirection;
|
|
38802
38933
|
/**
|
|
38803
38934
|
* Gets the model's classification type. This determines whether terrain,
|
|
38804
|
-
|
|
38805
|
-
|
|
38806
|
-
|
|
38807
|
-
|
|
38808
|
-
|
|
38809
|
-
|
|
38810
|
-
|
|
38811
|
-
|
|
38812
|
-
|
|
38813
|
-
|
|
38814
|
-
|
|
38815
|
-
|
|
38816
|
-
|
|
38817
|
-
|
|
38818
|
-
|
|
38819
|
-
|
|
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>
|
|
38820
38951
|
*/
|
|
38821
38952
|
readonly classificationType: ClassificationType;
|
|
38822
38953
|
/**
|
|
38823
38954
|
* Returns the node with the given <code>name</code> in the glTF. This is used to
|
|
38824
|
-
|
|
38955
|
+
* modify a node's transform for user-defined animation.
|
|
38825
38956
|
* @example
|
|
38826
38957
|
* // Apply non-uniform scale to node "Hand"
|
|
38827
|
-
|
|
38828
|
-
|
|
38958
|
+
* const node = model.getNode("Hand");
|
|
38959
|
+
* node.matrix = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(5.0, 1.0, 1.0), node.matrix);
|
|
38829
38960
|
* @param name - The name of the node in the glTF.
|
|
38830
38961
|
* @returns The node, or <code>undefined</code> if no node with the <code>name</code> exists.
|
|
38831
38962
|
*/
|
|
38832
38963
|
getNode(name: string): ModelNode;
|
|
38833
38964
|
/**
|
|
38834
38965
|
* Sets the current value of an articulation stage. After setting one or
|
|
38835
|
-
|
|
38836
|
-
|
|
38966
|
+
* multiple stage values, call Model.applyArticulations() to
|
|
38967
|
+
* cause the node matrices to be recalculated.
|
|
38837
38968
|
* @example
|
|
38838
38969
|
* // Sets the value of the stage named "MoveX" belonging to the articulation named "SampleArticulation"
|
|
38839
|
-
|
|
38970
|
+
* model.setArticulationStage("SampleArticulation MoveX", 50.0);
|
|
38840
38971
|
* @param articulationStageKey - The name of the articulation, a space, and the name of the stage.
|
|
38841
38972
|
* @param value - The numeric value of this stage of the articulation.
|
|
38842
38973
|
*/
|
|
38843
38974
|
setArticulationStage(articulationStageKey: string, value: number): void;
|
|
38844
38975
|
/**
|
|
38845
38976
|
* Applies any modified articulation stages to the matrix of each node that
|
|
38846
|
-
|
|
38847
|
-
|
|
38977
|
+
* participates in any articulation. Note that this will overwrite any node
|
|
38978
|
+
* transformations on participating nodes.
|
|
38848
38979
|
*/
|
|
38849
38980
|
applyArticulations(): void;
|
|
38850
38981
|
/**
|
|
38851
38982
|
* Returns the object that was created for the given extension.
|
|
38852
|
-
|
|
38853
|
-
|
|
38854
|
-
|
|
38855
|
-
|
|
38856
|
-
|
|
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.
|
|
38857
38988
|
* @param extensionName - The name of the extension
|
|
38858
38989
|
* @returns The object, or `undefined`
|
|
38859
38990
|
*/
|
|
38860
38991
|
getExtension(extensionName: string): any | undefined;
|
|
38861
38992
|
/**
|
|
38862
38993
|
* Marks the model's {@link Model#style} as dirty, which forces all features
|
|
38863
|
-
|
|
38994
|
+
* to re-evaluate the style in the next frame the model is visible.
|
|
38864
38995
|
*/
|
|
38865
38996
|
makeStyleDirty(): void;
|
|
38997
|
+
/**
|
|
38998
|
+
* Displays the model in wireframe mode.
|
|
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
|
+
* @param [options] - Optional parameters for wireframe display
|
|
39008
|
+
* @param [options.color = Color.WHITE] - The color of the wireframe edges
|
|
39009
|
+
* @param [options.fillColor] - The fill color of the model when in wireframe mode. If undefined, the model's original material/color is preserved.
|
|
39010
|
+
* @param [options.fillAlpha = 0.2] - The alpha value of the fill color. Only applies when fillColor is specified.
|
|
39011
|
+
* @param [options.colorBlendMode = ColorBlendMode.REPLACE] - How the fill color blends with the model. Only applies when fillColor is specified.
|
|
39012
|
+
* @param [options.lineWidth = 1.0] - The width of the wireframe lines (only applies to barycentric mode)
|
|
39013
|
+
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
39014
|
+
* @param [options.overlay = false] - If true, wireframe color is overlaid on top of the model's original material (only applies to barycentric mode)
|
|
39015
|
+
* @returns This model instance, to allow chaining of method calls.
|
|
39016
|
+
*/
|
|
39017
|
+
showWireframe(options?: {
|
|
39018
|
+
color?: Color;
|
|
39019
|
+
fillColor?: Color;
|
|
39020
|
+
fillAlpha?: number;
|
|
39021
|
+
colorBlendMode?: ColorBlendMode;
|
|
39022
|
+
lineWidth?: number;
|
|
39023
|
+
mode?: "lines" | "barycentric";
|
|
39024
|
+
overlay?: boolean;
|
|
39025
|
+
}): Model;
|
|
39026
|
+
/**
|
|
39027
|
+
* Hides the model's wireframe, restoring it to normal rendering mode.
|
|
39028
|
+
* <p>
|
|
39029
|
+
* Only affects this model; other models in the scene remain unchanged.
|
|
39030
|
+
* </p>
|
|
39031
|
+
* @returns This model instance, to allow chaining of method calls.
|
|
39032
|
+
*/
|
|
39033
|
+
hideWireframe(): Model;
|
|
39034
|
+
/**
|
|
39035
|
+
* Toggles the model's wireframe display state.
|
|
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
|
+
* @param [options] - Optional parameters for wireframe display (only applied when switching to wireframe mode)
|
|
39047
|
+
* @param [options.color = Color.WHITE] - A color to apply to the model while in wireframe mode
|
|
39048
|
+
* @param [options.colorBlendMode = ColorBlendMode.REPLACE] - How the color blends with the model
|
|
39049
|
+
* @param [options.mode = "lines"] - The wireframe rendering mode
|
|
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
|
+
* @returns <code>true</code> if the model is now displayed in
|
|
39052
|
+
* wireframe mode, <code>false</code> if it is in normal mode.
|
|
39053
|
+
*/
|
|
39054
|
+
toggleWireframe(options?: {
|
|
39055
|
+
color?: Color;
|
|
39056
|
+
colorBlendMode?: ColorBlendMode;
|
|
39057
|
+
mode?: "lines" | "barycentric";
|
|
39058
|
+
overlay?: boolean;
|
|
39059
|
+
}): boolean;
|
|
38866
39060
|
/**
|
|
38867
39061
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
38868
|
-
|
|
38869
|
-
|
|
38870
|
-
|
|
38871
|
-
|
|
38872
|
-
|
|
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>
|
|
38873
39067
|
*/
|
|
38874
39068
|
update(): void;
|
|
38875
39069
|
/**
|
|
38876
39070
|
* Returns true if this object was destroyed; otherwise, false.
|
|
38877
|
-
|
|
38878
|
-
|
|
38879
|
-
|
|
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.
|
|
38880
39074
|
* @returns <code>true</code> if this object was destroyed; otherwise, <code>false</code>.
|
|
38881
39075
|
*/
|
|
38882
39076
|
isDestroyed(): boolean;
|
|
38883
39077
|
/**
|
|
38884
39078
|
* Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
|
|
38885
|
-
|
|
38886
|
-
|
|
38887
|
-
|
|
38888
|
-
|
|
38889
|
-
|
|
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.
|
|
38890
39084
|
* @example
|
|
38891
39085
|
* model = model && model.destroy();
|
|
38892
39086
|
*/
|
|
38893
39087
|
destroy(): void;
|
|
38894
39088
|
/**
|
|
38895
39089
|
* <p>
|
|
38896
|
-
|
|
38897
|
-
|
|
38898
|
-
|
|
38899
|
-
|
|
38900
|
-
|
|
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.
|
|
38901
39095
|
* @example
|
|
38902
39096
|
* // Load a model and add it to the scene
|
|
38903
|
-
|
|
38904
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
38905
|
-
|
|
38906
|
-
});
|
|
38907
|
-
viewer.scene.primitives.add(model);
|
|
38908
|
-
|
|
38909
|
-
console.log(`Failed to load model. ${error}`);
|
|
38910
|
-
|
|
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
|
+
* }
|
|
38911
39105
|
* @example
|
|
38912
39106
|
* // Position a model with modelMatrix and display it with a minimum size of 128 pixels
|
|
38913
|
-
|
|
38914
|
-
|
|
38915
|
-
|
|
38916
|
-
|
|
38917
|
-
|
|
38918
|
-
|
|
38919
|
-
|
|
38920
|
-
|
|
38921
|
-
|
|
38922
|
-
|
|
38923
|
-
|
|
38924
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
38925
|
-
|
|
38926
|
-
|
|
38927
|
-
|
|
38928
|
-
|
|
38929
|
-
|
|
38930
|
-
|
|
38931
|
-
|
|
38932
|
-
|
|
38933
|
-
});
|
|
38934
|
-
viewer.scene.primitives.add(model);
|
|
38935
|
-
|
|
38936
|
-
console.log(`Failed to load model. ${error}`);
|
|
38937
|
-
|
|
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
|
+
* }
|
|
38938
39132
|
* @example
|
|
38939
39133
|
* // Load a model and play the last animation at half speed
|
|
38940
|
-
|
|
38941
|
-
|
|
38942
|
-
const model = await Cesium.Model.fromGltfAsync({
|
|
38943
|
-
|
|
38944
|
-
|
|
38945
|
-
|
|
38946
|
-
|
|
38947
|
-
});
|
|
38948
|
-
viewer.scene.primitives.add(model);
|
|
38949
|
-
model.readyEvent.addEventListener(() => {
|
|
38950
|
-
|
|
38951
|
-
|
|
38952
|
-
|
|
38953
|
-
|
|
38954
|
-
|
|
38955
|
-
});
|
|
38956
|
-
|
|
38957
|
-
console.log(`Failed to load model. ${error}`);
|
|
38958
|
-
|
|
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
|
+
* }
|
|
38959
39153
|
* @param options - Object with the following properties:
|
|
38960
39154
|
* @param options.url - The url to the .gltf or .glb file.
|
|
38961
39155
|
* @param [options.basePath = ''] - The base path that paths in the glTF JSON are relative to.
|