This is a simulation of a rotating 4 dimensional Cube, otherwise known as a Tesseract.
What you are seeing is it Rotating. It is not being distorted, reshaped, or anything like that. it is simply Rotating – It appears to be distorted because you are only seeing the ‘projection’ of it. similarly if you rotated a 3D cube infront of lamp the shadow you would see would appear to distort.