async function renderHeadless(view, type, scaleFactor, opt) {
    const module = renderModule(type),
      ctr = module && module.headless;
    if (!ctr) error('Unrecognized renderer type: ' + type);
    await view.runAsync();
    return initializeRenderer(view, null, null, ctr, scaleFactor, opt).renderAsync(view._scenegraph.root);
  }
Render the current scene in a headless fashion.
This method is asynchronous, returning a Promise instance.
@return {Promise} - A Promise that resolves to a renderer.