Three-dimensional single-shot ptychography