Three.js texture scale

When changing the coordinates in this example, the texture of the first part behaves in a standard way, and the second part is distorted.
How to make sure that when the coordinates change on the 2nd part of the object, the texture behaves the same as on the 1st? did not change direction)

A very rough example with re-computing of UVs: Edit fiddle - JSFiddle - Code Playground

2 Likes