How to update properties of dataSource like alpha and saturation?

1. A concise explanation of the problem you’re experiencing.

I’d like to import multiple dataSources into Cesium from different KML files. Then allow the user to manipulate the appearance of each file’s data.

There are examples with imageryProviders, but not dataSources.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

Import KML as in this sandcaslte example:

Then have a menu to manipulate the properties of the dataSource such as alpha and saturation-

Examples with imagery:

Alternatively, is there a way to import / convert a dataSource to an imageryLayer to have properties that can be manipulated more directly?

When you import a KML file in CesiumJS, it creates a set of entities representing the geometries in the file. You can access these entities and edit them as needed.

For example, you can see the “custom styling” example in this Sandcastle which will extrude and randomly color each polygon in the loaded data source:

I have a case where I want to set the the alpha value for everything represented by a KmlDataSource.

As far as I can tell neither KmlDataSource or Entities has an alpha value associated with it.

Any suggestions on how to update the alpha/transparency of an entire data source?