I am working on custom 3d tiles using CesiumJS, my tileset.json can already loaded to cesium. I am using 3d-tiles-tools to convert the gltf to glb and tileset.json. My model is the power line which is drawn by 11 cartesian coordinates.
I want to use the 3d tiles style to change the color of the tileset.
To my understanding, I could embed the metadata using the EXT_mesh_features to make those metadata pointing to relevant mesh in gltf.
The issue I had is :
1. it seems it couldn’t recognize as 3d tiles when I use the mouse event to console log it
2. the undefined in the 3d tiles style applies, I guess it is not recognize any of the metadata.
Please see the sandcastle example, files can also download to view from here: files
The following is how I use the 3d tiles style
const styleByVoltage = new Cesium.Cesium3DTileStyle({
color: {
conditions: [
["${Voltage} === undefined", "color('yellow')"], // Show tiles where Voltage is 240 or higher
["${Voltage} > 1200", "color('red')"], // Show tiles where Voltage is 240 or higher
["true", "color('blue')"], // Hide all other tiles
],
},
});
I think it might also related in github, cesium community.