File size: 426 Bytes
3831e97 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | """Accessibility helpers."""
from __future__ import annotations
def consider_duration(base: float, pace_mult: float, reduce_motion: bool) -> float:
"""If reduce_motion, shorten consider waits (less waiting animation)."""
dur = base * pace_mult
if reduce_motion:
return max(0.5, dur * 0.35)
return dur
def particle_count(base: int, reduce_motion: bool) -> int:
return 0 if reduce_motion else base
|