function getLargeElements(minWidth = 0.3, minHeight = 0.3) {
    const viewportWidth = window.innerWidth;
    const viewportHeight = window.innerHeight;
    const minWidthPx = viewportWidth * minWidth;
    const minHeightPx = viewportHeight * minHeight;

    let lastRect = new DOMRect(0, 0, 0, 0);
    let elements = getVisibleElements((element, visibleElements) => {
        if (element === document.body) return;
        const rect = element.getBoundingClientRect();
        const tolerance = 16;
        if (Math.abs(rect.x - lastRect.x) < tolerance
            && Math.abs(rect.y - lastRect.y) < tolerance
            && Math.abs(rect.width - lastRect.width) < tolerance
            && Math.abs(rect.height - lastRect.height) < tolerance) {
            return;
        }
        if (Math.abs(viewportWidth - rect.width) < 4
            && Math.abs(viewportHeight - rect.height) < 4) {
            return;
        }
        if (rect.width < minWidthPx && rect.height < minHeightPx) return;
        if ((rect.width / viewportWidth) * (rect.height / viewportHeight) < minWidth * minHeight / 6) return;
        const style = getComputedStyle(element);
        if (style.opacity > 0.1 && style.visibility !== 'hidden' && style.display !== 'none') {
            visibleElements.push(element);
            lastRect = rect;
        }
    });
    return elements;
}
Get large elements that are currently visible in the viewport.
A large element is defined as one that takes up a significant portion of the viewport.

@param {number} [minWidth=0.3] Minimum width as a fraction of viewport width (0.0 to 1.0)
@param {number} [minHeight=0.3] Minimum height as a fraction of viewport height (0.0 to 1.0)
@returns {Array<Element>} Array of large visible elements

@example
// Get elements that are at least 30% of viewport dimensions
var largeElements = getLargeElements();

// Get elements that are at least 50% of viewport dimensions
var veryLargeElements = getLargeElements(0.5, 0.5);