How to texture merged geometries?

material_texture.zip (69.6 KB)
Good day
Guys, tell me how to do in this example, so that the texture is solid in the combined objects from all sides
It is not possible to prepare a texture for a solid object
Interested in the very technology of combining textures of geometries.
The texture should occupy the entire horizontal face. Be whole for the edge.
I think that here you need to work with uv attributes

I would appreciate a working example
Sorry for my English

Link to the sandbox and an example in the archive attached

In these examples from the Collection of examples from discourse.threejs.org you can see a similar object with uv calculation.

RoundEdgedBoxFlat
RoundedRectangle

see Round-edged box flat
RoundedRectangle

Links to discourse also in example source code.

1 Like

Thanks a lot hovk
Thanks to your examples I wrote
Textured geometry with rounded corners
Posted to the public

You helped me figure it out!