Use Texture for BufferGeometry

I defined vertices, edges and faces to construct a box
It uses BufferGeometry to construct faces of box from triangles

And it uses same texture like in original MeshBox (you may see it in screen capture)
But at result it provides material from color (i think it because of triangles)

Three.Shape constructs shape from plain 2d, but I need to use three axes

What are alternatives?

Did you provide texture coordinates (attribute name “uv”)?

Do you want to create something similar?

DungeonCreation2D
BufferLabyrinthCreation3D

from the Collection of examples from discourse.threejs.org

@grml,
got it, so i need to specify uv to map texture properly
working with this
.

I am using this texture definition

const draftFloorMaterial = new THREE.MeshStandardMaterial({
      map: draftFloorTileTexture,
      roughness: 0.8,
      metalness: 0.2,

      side: THREE.DoubleSide
    });

@grml
with providing uv mesh became without texturing

@grml
i did it, thx

@hofk
I dont see at examples to dont be messy, creating what is possible with threejs engine