Create buffer attributes, add them to geometry and process them in modified material’s shaders.
For example: Using shader x, y, z coordinates relative to the tilted object and not the scene in Three JS - #3 by prisoner849
And also: three.js examples