Problem moving canvas texture with mouse using fabric.js

I have weird problem while moving canvas texture applied to the plane geometry. When i click and drag the texture using the mouse, it takes screen space instead of UV space.

Below is the link to the codepen project

See the Pen Canvas Text by Sabhareesh (@Sabhareesh) on CodePen.

Thank you.

1 Like

/cc

I came up with the solution without using the fabric.js
Below is the link to the codepen project.

See the Pen ThreeJS Canvas Texture by Sabhareesh (@Sabhareesh) on CodePen.

Yet fabric.js gives more control over the canvas. So anyone help me with the solution.

Thank you.

1 Like

I updated codepen project with some fix. Still there are some problems with the events. Checkout the link below…

See the Pen Canvas Text by Sabhareesh (@Sabhareesh) on CodePen.

Hi, did you solve your problem?