fix minor visual bugs

This commit is contained in:
Boof2015
2026-07-25 20:37:19 -04:00
parent 54966b255d
commit c0683661b4
7 changed files with 127 additions and 26 deletions
+18
View File
@@ -0,0 +1,18 @@
export type SwipeLaneSide = 'left' | 'right';
/**
* Action lanes sit underneath an opaque row and should only exist visually
* while that row is moving toward them. Keeping them opaque at rest lets a
* parent scene-opacity animation reveal both half-width lane colors through the
* row on Android.
*/
export function swipeLaneOpacity(
translationX: number,
side: SwipeLaneSide
): number {
'worklet';
if (!Number.isFinite(translationX)) return 0;
return side === 'left'
? translationX > 1 ? 1 : 0
: translationX < -1 ? 1 : 0;
}