I believe it's actually not that complicated. ;) Start off by recreating two states:
1. the "squares", i.e. no relative translation or rotation,
2. the "hexes", with a rotation of x = PI/5, y = PI/4, and translation relative to the absolute center (0,0)
Then add a slider that allows you to blend between the two rotations and translations (via a mix(a, b, t), a.k.a lerp) per axis should suffice).
Once you have that and are satisified with the result, you start to control t based on a cube's angle, offset by the running time.