Putting text at the middle of an object

Hi everyone,

I’m trying to put my text at the middle of my shirt, someone can help me about that please ?
I would like to give users the possibility to place it where he wants, scale and rotate the text.

You will find the repository here : https://github.com/Kursorr/testthreejs
The file you want is located here : src/components/demo/Demo9.vue

Thank you in advance

Hi, you should do this with decals, look at this demo for example code : https://threejs.org/examples/?q=de#webgl_decals

I’m using the decals, but I don’t get what I want.

canvas textures maybe ? https://threejs.org/examples/?q=canvas#webgl_materials_texture_canvas

1 Like

The image you see here is not a Decal, I just pushed that inside the shirt. If I give it a scale of 1, that take my shirt well but the entire shirt is like this. This is not what I want.

The code is here : https://github.com/Kursorr/testthreejs/blob/c9a12bfceb16fd03b32da5cec25e0a45c11ba148/src/components/demos/Demo9.vue

How am I supposed to make it like a “paper” and insert it where I want in the shirt ?