Why is texture distorting at the sides? How to fix it?
You're using object coords. If you watch it right from above it will look okay. But since the edges of the blanket are not flat and have some verticality, X axis projects onto it and you see the distortion


The solution I think is to unwrap the mesh and use UV coordinates: