hold
Functionhold(
states: Union[State, List[State]],
t_start: float,
t_end: float,
hold_duration: Optional[float] = None,
easing: Optional[Dict[str, Callable[[float], float]]] = None
) -> List[KeyState]
Hold at state(s) for a duration, centered at 'at'.
Creates two identical keystates bracketing each hold period.
Parameters
-
states - State to hold, or list of states
-
at - Center time of the hold, or list of times (same length as states)
-
duration - Total duration of each hold
Returns
List of KeyState objects
Examples
# Single state hold
.segment(hold(s, at=0.5, duration=0.1))
# Expands to keystates at t=0.45 and t=0.55
# Multiple states with different times
.segment(hold([s1, s2, s3], at=[0.2, 0.5, 0.8], duration=0.1))
# Expands to 6 keystates (2 per state)