Animate[
OA={1,-1,1,1};OB={1,1,1,1};OC={-1,1,1,1};OD={-1,-1,1,1};
OE={1,-1,-1,1};OF={1,1,-1,1};OG={-1,1,-1,1};OH={-1,-1,-1,1};
Oa={1,-1,1,3};Ob={1,1,1,3};Oc={-1,1,1,3};Od={-1,-1,1,3};
Oe={1,-1,-1,3};Of={1,1,-1,3};Og={-1,1,-1,3};Oh={-1,-1,-1,3};

OJ={3,-1,-3,1};(*point for rotation of abcdefgh*)
OK={5,-1,-3,1};(*point for rotation of CDHGcdhg*)

EEE=Transpose[Table[OE,{8}]];(*matrices for translation of origin*)
CCC=Transpose[Table[OC,{8}]];
JJJ=Transpose[Table[OJ,{8}]];
KKK=Transpose[Table[OK,{8}]];

step:=Floor[t/(Pi/2)]+1;
u:=t-(step-1)*Pi/2;(*angle within each step*)

(*rotation around plane*)
Rxy:={{1,0,0,0},{0,1,0,0},{0,0,Cos[s],-Sin[s]},{0,0,Sin[s],Cos[s]}};
Ryz:={{Cos[s],0,0,-Sin[s]},{0,1,0,0},{0,0,1,0},{Sin[s],0,0,Cos[s]}};
Rzx:={{1,0,0,0},{0,Cos[s],0,-Sin[s]},{0,0,1,0},{0,Sin[s],0,Cos[s]}};

(*definition of polyhedron*)
polyhedron[vecs_]:={
Table[Polygon[{vecs[[1+4 k]],vecs[[2+4 k]],vecs[[3+4 k]],vecs[[4+4 k]]}],{k,0,1}],
Table[Polygon[{vecs[[1+k]],vecs[[2+k]],vecs[[6+k]],vecs[[5+k]]}],{k,0,2}],
Polygon[{vecs[[4]],vecs[[1]],vecs[[5]],vecs[[8]]}]};


(*definition of projection*)
(*MAY NEED TO CHANGE 'zrange' WHEN ANOTHER STYLE IS ADDED*)
proj[x_]:=Switch[
mode,
1,x[[{1,2,3}]],
2,x[[{1,2,4}]],
3,1/x[[4]]x[[{1,2,3}]]
];

zrange:=If[mode==2,{1,1.0+2Sqrt[2]},{-3,3}];



(*ABCDEFGH*)
ABCDEFGH:=Transpose[{OA,OB,OC,OD,OE,OF,OG,OH}];
vecsABCDEFGH:=Table[proj[(Transpose[ABCDEFGH])[[k]]],{k,1,8}];
polyABCDEFGH:=polyhedron[vecsABCDEFGH];


(*ABFEabfe*)
ABFEabfe0=Transpose[{OA,OB,OF,OE,Oa,Ob,Of,Oe}];
ABFEabfe1=(Ryz/.s->N[-Pi/2]).(ABFEabfe0-EEE)+EEE;
ABFEabfe:=Which[
step==1,(Ryz/.s->-u).(ABFEabfe0-EEE)+EEE,
step≥2,ABFEabfe1];
vecsABFEabfe:=Table[proj[(Transpose[ABFEabfe])[[k]]],{k,1,8}];
polyABFEabfe:=polyhedron[vecsABFEabfe];


(*AEHDaehd*)
AEHDaehd0=Transpose[{OA,OE,OH,OD,Oa,Oe,Oh,Od}];
AEHDaehd1=(Rzx/.s->N[Pi/2]).(AEHDaehd0-EEE)+EEE;
AEHDaehd:=Which[
step≤4,AEHDaehd0,
step==5,(Rzx/.s->u).(AEHDaehd0-EEE)+EEE,
step≥6,AEHDaehd1];
vecsAEHDaehd:=Table[proj[(Transpose[AEHDaehd])[[k]]],{k,1,8}];
polyAEHDaehd:=polyhedron[vecsAEHDaehd];


(*abcdefgh*)
abcdefgh0=Transpose[{Oa,Ob,Oc,Od,Oe,Of,Og,Oh}];
abcdefgh1=(Ryz/.s->N[-Pi/2]).(abcdefgh0-EEE)+EEE;
abcdefgh2=(Ryz/.s->-Pi/2).(abcdefgh1-JJJ)+JJJ;
abcdefgh:=Which[
step==1,(Ryz/.s->-u).(abcdefgh0-EEE)+EEE,
step==2,(Ryz/.s->-u).(abcdefgh1-JJJ)+JJJ,
step≥3,abcdefgh2];
vecsabcdefgh:=Table[proj[(Transpose[abcdefgh])[[k]]],{k,1,8}];
polyabcdefgh:=polyhedron[vecsabcdefgh];


(*EFGHefgh*)
EFGHefgh0=Transpose[{OE,OF,OG,OH,Oe,Of,Og,Oh}];
EFGHefgh1=(Rxy/.s->N[Pi/2]).(EFGHefgh0-EEE)+EEE;
EFGHefgh:=Which[
step≤6,EFGHefgh0,
step==7,(Rxy/.s->u).(EFGHefgh0-EEE)+EEE,
step≥8,EFGHefgh1];
vecsEFGHefgh:=Table[proj[(Transpose[EFGHefgh])[[k]]],{k,1,8}];
polyEFGHefgh:=polyhedron[vecsEFGHefgh];


(*ABCDabcd*)
ABCDabcd0=Transpose[{OA,OB,OC,OD,Oa,Ob,Oc,Od}];
ABCDabcd1=(Rxy/.s->-N[Pi/2]).(ABCDabcd0-CCC)+CCC;
ABCDabcd:=Which[
step≤5,ABCDabcd0,
step==6,(Rxy/.s->-u).(ABCDabcd0-CCC)+CCC,
step≥7,ABCDabcd1];
vecsABCDabcd:=Table[proj[(Transpose[ABCDabcd])[[k]]],{k,1,8}];
polyABCDabcd:=polyhedron[vecsABCDabcd];


(*BCGFbcgf*)
BCGFbcgf0=Transpose[{OB,OC,OG,OF,Ob,Oc,Og,Of}];
BCGFbcgf1=(Rzx/.s->-N[Pi/2]).(BCGFbcgf0-CCC)+CCC;
BCGFbcgf:=Which[
step≤3,BCGFbcgf0,
step==4,(Rzx/.s->-u).(BCGFbcgf0-CCC)+CCC,
step≥5,BCGFbcgf1];
vecsBCGFbcgf:=Table[proj[(Transpose[BCGFbcgf])[[k]]],{k,1,8}];
polyBCGFbcgf:=polyhedron[vecsBCGFbcgf];


(*CDHGcdhg*)
CDHGcdhg0=Transpose[{OC,OD,OH,OG,Oc,Od,Oh,Og}];
CDHGcdhg1=(Ryz/.s->N[-Pi/2]).(CDHGcdhg0-EEE)+EEE;
CDHGcdhg2=(Ryz/.s->N[-Pi/2]).(CDHGcdhg1-JJJ)+JJJ;
CDHGcdhg3=(Ryz/.s->N[-Pi/2]).(CDHGcdhg2-KKK)+KKK;
CDHGcdhg:=Which[
step==1,(Ryz/.s->-u).(CDHGcdhg0-EEE)+EEE,
step==2,(Ryz/.s->-u).(CDHGcdhg1-JJJ)+JJJ,
step==3,(Ryz/.s->-u).(CDHGcdhg2-KKK)+KKK,
step≥4,CDHGcdhg3];
vecsCDHGcdhg:=Table[proj[(Transpose[CDHGcdhg])[[k]]],{k,1,8}];
polyCDHGcdhg:=polyhedron[vecsCDHGcdhg];


(*show*)
Graphics3D[{
Opacity[0.2],Lighter[Red],polyABCDEFGH,
(*Opacity[0.2],*) Yellow,polyABFEabfe,
Opacity[0.8],LightGreen,polyAEHDaehd,
Opacity[0.7],LightRed,polyabcdefgh,
Opacity[0.8],Red,polyEFGHefgh,
Opacity[0.8],LightRed,polyABCDabcd,
Opacity[0.9],LightBlue,polyBCGFbcgf,
Opacity[0.3],Green,polyCDHGcdhg},
PlotRange->{{-1,7},{-3,3},zrange},Boxed->False],

(*controllers*)
{t,0,7/2  Pi},
{{mode,2,"projection style"},{1->"(x,y,z,u)->(x,y,z)",2->"(x,y,z,u)->(x,y,u)",3->"(x,y,z,u)->((x/u),(y/u),(z/u))"},ControlType->PopupMenu}
(*,ControlPlacement->Left*)
]