Panning material in local cords, not world cords to follow spline

Im trying to make a river with a material that pans along the local X axis of a mesh, so it can follow a spline, but just using the panner node it seems to only work in world space. How do I get the material to pan and follow the spine its placed on (or just pan on the X axis of the mesh)?