I have produced a line-organized b3dm model (where the binary GLB model stored within is organized by lines rather than meshes). This model can be loaded in Cesium without issues. However, I am unable to change its color using the Cesium3DTileStyle. The styling seems to be ineffective for this particular organization of the b3dm model.
The model appears red because the GLTF model within has red material settings. However, if I do not set the material color in the GLTF model, it still does not display in yellow
How can I resolve this issue?
let tileset3;
try {
tileset3 = await Cesium.Cesium3DTileset.fromUrl(
"http://192.168.3.81:10086/tileset-line.json", {
maximumScreenSpaceError: 0,
// modelMatrix: modelMatrix
}
);
// 设置颜色
tileset3.style = new Cesium.Cesium3DTileStyle({
color: 'color("yellow")',
});
viewer.value.scene.primitives.add(tileset3);
viewer.value.scene.globe.depthTestAgainstTerrain = true;
viewer.value.flyTo(
tileset3
);
tileset3.debugShowBoundingVolume = true
} catch (error) {
console.log(`Error loading tileset: ${error}`);
}
}