How to change face color in Three.js

  • Update library to r53.
  • Add vertexColors: THREE.FaceColors in
    material.
  • And finally use face.color.setRGB( Math.random(),
    Math.random(), Math.random())
    .

    Now no need to traverse loop for 4
    sides (a,b,c,d) for THREE.Face4 or 3 sides (a,b,c) for
    THREE.Face3.

    This works in both WebGL and Canvas rendering.

Example

three.js r53

Leave a Comment