Hi everyone,
I'm trying to move the UV coordinates on a model so that the user has the option to move the texture around the model.
To illustrate this, here is a 13s video of the Babylon.js sandbox where this can be done with the UI: https://www.loom.com/share/681d7be500a74534a41f90ad2f9a5ff5
I've been looking through the docs, but couldn't see anything specifically about that.
drcmda mentions something similar in a GitHub comment from two years ago (https://github.com/pmndrs/react-three-fiber/discussions/1488), which I experimented with, but I haven't found documentation about the uv property and the .setXY method he's recommending.
As an alternative, I tried working with offsetting and scaling the texture, which gets me part of the way there, but the texture doesn't properly map around and the edges get stretched and pixelated (see attached image).
I'm using React Three FIber. The meshes from my GLB are structured like this:
<mesh
geometry={nodes.K_Back.geometry}
material={materials.K_Body}
position={[…]}
rotation={[…]}
>
<meshStandardMaterial
map={pattern}
…
/>
</mesh>
Any ideas are much appreciated.
Thanks for your help guys!