Is it possible to update the color of a model in colleda using the code below, but how do we handle the dimensions of the vertices and update the model? For example, can we store the dimensions in a separate file (e.g. .js) and then access them in A-Frame using the method below to set x, y, z values?
function update_hair_style(verticesdimensionarray){
alert("update hair")
var model = document.querySelector('#hairmodel');
<!-- console.log(model); -->
var mesh = model.getObject3D('mesh');
<!-- console.log(mesh) -->
mesh.traverse(function(o) {
<!-- console.log(o) -->
<!-- console.log("-------------------------------------------------"); -->
if (o instanceof THREE.Mesh) {
console.log(o.geometry.vertices)
//o.material.color = { r: r, g: g, b };
}else{
<!-- console.log("ELSE"); -->
}
});
}