Option A - modify UVs instead of the texture (if the texture applied only to a single mesh.)
Option B - Create a CanvasTexture, draw your texture to its canvas and modify it using CanvasAPI - it already has all the translations, rotations, and scaling you’ll ever need (plus you can access raw pixel data right from the canvas context.)