I want to change the color of objects child means i want to change the color of materials by name Please do some help Here sample photo is attached for you refrence
I write this code but it’s change the color of object but not the color materials or its child.
object.traverse( function ( child ) {
if ( child instanceof THREE.Object3D ) {
// console.log(child.name +"test");
console.log("~ materials ~");
console.log(child.material);
//console.log(child);
//console.log(object);
if(child.name==='010001_Autoscale'){
alert("010001_Autoscale");
child.material.color.setHex(0xffff00);
}
}
} );
This code just change the color of object