Indications on replicating effect

Hello. I would like some indications on how to replicate the transition effect between the images on this site: link (the transition effect with the squares). Please offer some ideas on how to do that effect. As many indications as possible are welcomed. Thanks.

you would create a function with the tween inside it

the MC it works on would be an variable name, every static number would be a variable which corrisponded to each individual square

then run in a loop I assume.