I’m developing a project to add and move some decals on a T-shirt.
If you drag the move button, you can move the decal where you want. But there is a little performance issue related to how the decal moves.
The only solution I found for moving the decal is removing the current decal geometry and creating a new one for each frame like this:
decalMesh.geometry.dispose();
var decalGeometry = new DecalGeometry( mesh, decalPos, decalRot, decalScale );
decalMesh.geometry = decalGeometry;
Thank you for your reply, the issue is about deleting and creating decals in each frame.
Your solution about using texture with UVs and canvasTexture 2D is completely feasible and I think it is the best solution, but as you said, this solution requires a complete rebuild of the app.
I’m seeking a solution to optimize the decal movement.