Hello !!!
I need convert from old version to new
Old =>https://codepen.io/Lighty/pen/qBobzWN
New => https://codepen.io/Lighty/pen/bGvpoEq
in general, I don’t understand how to change this piece of code
geometry.faces.forEach(f => {
const a = geometry.vertices[f.a];
const b = geometry.vertices[f.b];
const c = geometry.vertices[f.c];
let max = Math.max(a.z, Math.max(b.z, c.z));
if (max <= 0){
return f.color.set(0x44ccff);
}else if (max <= 1.5){
return f.color.set(0x228800);
}
else if (max <= 3.5){
return f.color.set(0xeecc44);
}
})