Texturing the created wall

Good afternoon.
I drew the wall using lines. Then, using a shape and ExtrudeBufferGeometry, I created a wall.
Then again, using a shape and ExtrudeBufferGeometry, I created openings for windows and doors.
OK, great :smile:


Now I need to apply a texture to the wall, and for this I need to work in UV coordinates.
Tell me where to start and how to do it? For example, what are there? :roll_eyes:
Now the wall looks like this:

  1. In textured materials be sure to set texture wrapping to repeat, just like in the docs’ sample code (that’s why textures are currently smudged around the wall when you go beyond the texture size.)
  2. There’s quite a few algorithms listed around - for example here. Look around, someone may have already solved the issue, since it’s basically mapping of stretched cube UVs. In general, what you need to do is calculate the wall span and assign uv positions proportionally to the local vertex position on the wall (both vertically and horizontally.)

wrapping helped :slightly_smiling_face: