function getCanvasSize(canvasEl, embedded, maxSize, isVR) {
  if (!canvasEl.parentElement) {
    return {
      height: 0,
      width: 0
    };
  }
  if (embedded) {
    var size;
    size = {
      height: canvasEl.parentElement.offsetHeight,
      width: canvasEl.parentElement.offsetWidth
    };
    return constrainSizeTo(size, maxSize);
  }
  return getMaxSize(maxSize, isVR);
}
Return the canvas size where the scene will be rendered.
Will be always the window size except when the scene is embedded.
The parent size will be returned in that case.
the returned size will be constrained to the maxSize maintaining aspect ratio.

@param {Element} canvasEl - the canvas element
@param {boolean} embedded - Is the scene embedded?
@param {object} maxSize - Max size parameters
@param {boolean} isVR - If in VR
@returns {number} Max size