I saw some solutions that accessed the THREE.BoxGeometry faces like that:
var geometry = new THREE.BoxGeometry(n,n,n)
let faces = geometry.faces;
for (let face of faces) {
face.color.set(Math.random() * 0xffffff);
}
But it seems that the faces
-array doesn't exist in the current Three.js version r129 (Uncaught TypeError: faces is not iterable
).
How can I achieve an easy coloring of the six cube faces?