Bolt: Optimize GradientBlinds pointer handling #32

Merged
ragusa-it merged 1 commits from bolt-perf-gradient-blinds-9776062727377295977 into main 2026-01-29 04:15:58 +00:00

1 Commits

Author SHA1 Message Date
google-labs-jules[bot]
bac867f228 perf(GradientBlinds): decouple pointer events from render loop
- Move scroll position and bounding client rect calculations from `pointermove` handler to `requestAnimationFrame` loop.
- Use `pointerPosRef` to store raw event coordinates, reducing overhead in high-frequency event handlers.
- Ensure spotlight effect correctly accounts for scroll position updates during animation frames.
- Add regression test to verify `scrollX` is not accessed during pointer events.

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
2026-01-29 01:40:38 +00:00