I am trying to stylize my 3dtileset of 3D buildings. I am using this code:
tileset.style = new Cesium.Cesium3DTileStyle({
color:{
conditions:[
[‘true’, ‘color(“white”)’]
]
}
});
and I am able to change the building colors. Now I want to color them based on conditions and tried this code:
tileset.style = new Cesium.Cesium3DTileStyle({
color:{
conditions:[
[’{Height} >= 100', 'color("yellow", 0.5)'],
['{Height} >= 30’, ‘color(“blue”)’],
[‘true’, ‘color(“red”)’]
]
},
show: ‘${Height} > 0’
});
but now I am getting the Runtime Error which stops Cesium from rendering. I’m not sure how to fix this
I actually solved this myself, the attribute ‘Height’ was an attribute exported from FME and it was exporting it as a string instead of a float