i change the code as thas , and servel building have featureId=5,can i distinct each building
const tileset = await Cesium.Cesium3DTileset.fromIonAssetId(75343, {
customShader: new Cesium.CustomShader({
uniforms: {
u_time: {
type: Cesium.UniformType.FLOAT,
value: 0,
},
},
lightingModel: Cesium.LightingModel.UNLIT,
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
material.diffuse = vec3(0.0, 0.0, 1.0);
material.diffuse.g = -fsInput.attributes.positionEC.z / 1.0e4;
}
`,
vertexShaderText: `
void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput)
{
int featureId = vsInput.featureIds.featureId_0;
if(featureId == 5){
vsOutput.positionMC.y = vsInput.attributes.positionMC.y + 105.9 * sin(u_time);
vsOutput.positionMC.x = vsInput.attributes.positionMC.x + 105.9 * sin(u_time);
}
}
`,
}),
});
const startTime = performance.now();
viewer.scene.postUpdate.addEventListener(function () {
const elapsedTimeSeconds = (performance.now() - startTime) / 1000;
tileset.customShader.setUniform("u_time", elapsedTimeSeconds);
});