Is there a way to render threejs scene to a CubeMap or Equirectangular image?

The intention is to compile the rendered sequence to create a 360 video. So far no luck finding any information on the web

read the source of CubeCamera