function getMaxSize(maxSize, isVR) {
  var size;
  size = {
    height: document.body.offsetHeight,
    width: document.body.offsetWidth
  };
  if (isVR) {
    return size;
  } else {
    return constrainSizeTo(size, maxSize);
  }
}
Return the canvas size. Will be the window size unless that size is greater than the
maximum size (no maximum by default). The constrained size will be returned in that case,
maintaining aspect ratio

@param {object} maxSize - Max size parameters (width and height).
@param {boolean} isVR - If in VR.
@returns {object} Width and height.