0

It would be helpful if I could do it when registering a new custom mesh. Can you set color and opacity to each individual face, as the face is being pushed to a custom geometry ?

If not? Can you cycle through afterwards in a for-next loop to do it ?

I couldn't even get:

geometry.faces.push(new THREE.Face3(0, 1, 2, 0, "#333"));

to assign a color, much less an opacity.

I know the order is: (Red, Green, Blue, Normal, Color) Is there an available entry for opacity as well? Or would I have to assign a complete material as well ? I'm open do doing it that way if needed.

Piotr Adam Milewski
  • 14,150
  • 3
  • 21
  • 42
Ronk
  • 215
  • 2
  • 11
  • You probably should try using [vertexColors](https://stackoverflow.com/a/70404932/2425787) which [now](https://github.com/mrdoob/three.js/pull/20975#discussion_r589639751) can have the alpha value [like in this example](https://github.com/mrdoob/three.js/blob/master/examples/webgl_buffergeometry.html#L141) – Piotr Adam Milewski Jan 02 '23 at 09:25

0 Answers0