mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
elementRect.left/top from getBoundingClientRect() already reflects GSAP transforms in viewport coordinates. Subtracting rootRect.left/top cancels the transform, pinning overlays to the un-animated layout position. Use elementRect directly so overlays track elements during scroll (y: -500) and entrance (scale: 0.95) animations.