Hello there!
Currently, I'm working on a project where I'm generating a TextMesh using font geometry and placing it within an empty pivot object. My goal is to obtain the world coordinates of each vertex in the TextMesh so that I can manipulate them for various text transformations such as custom bending.
Below is the code snippet:
var pivot = new THREE.Object3D();
pivot.add(textMesh);
pivot.position.set(x, y, z);
pivot.rotation.set(roll, pitch, yaw);
scene.add(pivot);
pivot.updateMatrixWorld(true);
for(var i = 0; i < textMesh.geometry.vertices.length; i++)
{
var worldCoords = textMesh.localToWorld(textMesh.geometry.vertices[i]);
}
I encountered an unexpected issue where the "localToWorld" function altered the position of my textMesh. Is there a method to retrieve the world position of each mesh vertex without causing the mesh to shift? Additionally, do you have any suggestions for efficiently bending a text mesh along a cylinder? I've explored options like MOD3 but haven't found a compatible solution for my current setup, prompting me to consider developing it myself.
Thank you for your assistance!