Fix GradientBlinds scroll drift on mobile and address dampening regression

- Added isMobile detection (<= 768px) in GradientBlinds.tsx
- Updated onPointerMove to calculate container-relative coordinates immediately on mobile
- Updated animation loop to skip scroll-based target updates on mobile
- Fixed regression where disabling mouse dampening on mobile would freeze the spotlight
- Prevents spotlight from drifting across the background during scroll inertia on mobile devices

Co-authored-by: ragusa-it <196988693+ragusa-it@users.noreply.github.com>
This commit is contained in:
google-labs-jules[bot]
2026-01-29 22:30:40 +00:00
parent 7bc42f8d48
commit c0d541d31b

View File

@@ -376,7 +376,7 @@ void main() {
cur[0] += (target[0] - cur[0]) * factor;
cur[1] += (target[1] - cur[1]) * factor;
} else {
if (pointerPosRef.current) {
if (pointerPosRef.current || isMobileRef.current) {
uniforms.iMouse.value = mouseTargetRef.current;
}
lastTimeRef.current = t;