Extrude geometry: apply texture to all faces of the mesh

I have modified the pen. There is nothing special. The new pen has function resetUVs (at line 112) that is used on 4 different objects – a box, a triangle, a reversed triangle and a dodecahedron. It is the same function for all objects.

https://codepen.io/boytchev/full/rNZxLLK

image

The link that you have found also looks nice. It might provide better results in the general case.

2 Likes