How do I style CZML tilesets?

Hello,

I am loading a point cloud through CZML, and would like to specify the 3D Tile Style’s point size.
I’m choosing to load through CZML to use the availability property for point cloud playback.

The tileset entity objects which I am adding to the CZML look like this:

// Tileset Entity Object
{
    id: `tileset_${index}_${tileset.id}`,
    availability: tileset.availability,
    tileset: {
      uri: `${tileset.url}&access_token=${tileset.accessToken}`
    }
  }

Attempting to change the tile style after the CZML source is loaded does not have an effect:

// Attempting to change tileset style after loading CZML
// (Doesn't work)

const czml = await createCZML(...);
const czmlDataSource = await Cesium.CzmlDataSource.load(czml);

czmlDataSource.entities.values.forEach(entity => {
  if (entity.tileset) {
    entity.tileset.style = new Cesium.Cesium3DTileStyle({
      pointSize: '10'
    });
  }
});

Is there a way to style my point cloud tileset after loading it through CZML?

This other post is also about same issue: Cannot style 3d tile point cloud that are loaded using czml

Thank you so much!

Hi there,

Ah, 3D Tiles loaded as an Entity with CZML has a limited API compared to loading it as a 3D Tileset directly.

I’m curious about this point:

If you would like to access the full API available through Cesium3DTileset, it would still be possible to evaluate availability each frame and then modify the show property of the tileset.