Vanilla Javascript 3D cube (1/2)