Special relativity
There is nothing special about the x-axis. The transformation can apply to the y- or z-axis, or indeed in any direction, which can be done by directions parallel to the motion (which are warped by the γ factor) and perpendicular; see the article Lorentz transformation for details.