style

The style, defined using the 3D Tiles Styling language, applied to each feature in the tileset.

Assign undefined to remove the style, which will restore the visual appearance of the tileset to its default when no style was applied.

The style is applied to a tile before the Cesium3DTileset.tileVisible event is raised, so code in tileVisible can manually set a feature's properties (e.g. color and show) after the style is applied. When a new style is assigned any manually set properties are overwritten.

Use an always "true" condition to specify the Color for all objects that are not overridden by pre-existing conditions. Otherwise, the default color Cesium.Color.White will be used. Similarly, use an always "true" condition to specify the show property for all objects that are not overridden by pre-existing conditions. Otherwise, the default show value true will be used.

tileset.style = new Cesium3DTileStyle({
color : {
conditions : [
['${Height} >= 100', 'color("purple", 0.5)'],
['${Height} >= 50', 'color("red")'],
['true', 'color("blue")']
]
},
show : '${Height} 0',
meta : {
description : '"Building id ${id} has height ${Height}."'
}
});

See also