docs: function getRect(element, reference) {
    if (element === window) return getViewportRect();
  
    if (!reference) reference = window;
  
    let elements = [].concat(element);
    let n = elements.length;
  
    if (n <= 0) return null;
  
    let refRect = getRect(reference);
  
    if (!assert(refRect, 'Cannot determine reference FOV.')) return null;
  
    let winRect = getRect(window);
    let rect = {};
  
    for (let i = 0; i < n; i++) {
      let e = elements[i];
      let c = e.getBoundingClientRect();
  
      let w = c.width;
      let h = c.height;
      let t = c.top + winRect.top;
      if (reference !== window) t -= refRect.top;
      let l = c.left + winRect.left;
      if (reference !== window) l -= refRect.left;
      let b = t + h;
      let r = l + w;
  
      rect.left = (rect.left === undefined) ? l : rect.left = Math.min(rect.left, l);
      rect.right = (rect.right === undefined) ? r : rect.right = Math.max(rect.right, r);
      rect.top = (rect.top === undefined) ? t : rect.top = Math.min(rect.top, t);
      rect.bottom = (rect.bottom === undefined) ? b : rect.bottom = Math.max(rect.bottom, b);
    }
  
    rect.width = rect.right - rect.left;
    rect.height = rect.bottom - rect.top;
  
    return rect;
  }