About uploading 3dtile to Cesium

When I upload the 3dtile to Cesium, I need to wait for the tileset to finish loading before I can move the camera to the model, my method is as follows:

tileset.await.then(function (tileset) {
viewer.zoomTo(tileset);
}).catch(function (error) {
console.error('Error: ', error);
});

but problem is that Uncaught TypeError: Cannot read properties of undefined (reading ‘then’)

Who was able to give the correct code, thanks

Hi,

Welcome to the Cesium community @peng_chen

You can find an example of how to load and view data in ion by going to the View complete code example link in the asset details panel. Here is an example of viewing a 3D tileset asset.

const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(<insert your id here>);
viewer.scene.primitives.add(tileset);
await viewer.zoomTo(tileset);