timing
attribute__all__= ['timing_easing', 'timing_easing_by_disp', 'timing_glitch']functiming_glitch(*, t0, t1, count, speed_range, base_speed, til=0) -> list[TimelineSpeedEvent]Generate a glitch/stutter of scroll-speed spikes across [t0, t1).
count evenly-spaced spikes are emitted. Each spike is a :class:TimelineSpeedEvent
whose speed alternates base_speed - speed_range, base_speed + speed_range, ... ,
immediately followed one tick later by a reset event back to base_speed. Pass
base_speed=0.0 for a freeze-style glitch or base_speed=1.0 for jitter around normal
scroll.
paramt0int | PositionLikeStart tick or position; the first spike begins here.
paramt1int | PositionLikeEnd tick or position; no spike starts at or after it.
paramcountintNumber of spikes to generate (at least 1).
paramspeed_rangefloatMagnitude of each spike's deviation from base_speed.
parambase_speedfloatRest speed the glitch snaps back to between spikes.
paramtilint= 0Timeline (TIL) index assigned to every event.
Returns
listThe generated events in time order (two per spike: the spike then its reset).
functiming_easing(*, t0, t1, start_speed, end_speed, count, easing='linear', til=0) -> list[TimelineSpeedEvent]Ramp scroll speed from start_speed to end_speed along an easing curve.
The speed value itself is sampled from the easing curve at count + 1 evenly-spaced
points, so the first event lands on start_speed and the last on end_speed. Use
easing="linear" for a straight ramp.
paramt0int | PositionLikeStart tick or position (first event).
paramt1int | PositionLikeEnd tick or position (last event).
paramstart_speedfloatSpeed at t0.
paramend_speedfloatSpeed at t1.
paramcountintNumber of subdivisions; yields count + 1 events (at least 1).
parameasingEaseLike= 'linear'Easing applied to the ramp (name, :class:Easing, or callable).
paramtilint= 0Timeline (TIL) index assigned to every event.
Returns
listThe generated events in time order.
functiming_easing_by_disp(*, t0, t1, base_speed, count, easing, til=0) -> list[TimelineSpeedEvent]Generate speeds whose integrated displacement follows an easing curve.
Unlike :func:timing_easing, which samples the curve's value, this samples the curve's
slope (velocity) and scales it by base_speed, so the accumulated scroll displacement
traces the easing shape: speed is high where the curve is steep and low where it is flat.
The slope is approximated with a central finite difference.
paramt0int | PositionLikeStart tick or position (first event).
paramt1int | PositionLikeEnd tick or position (last event).
parambase_speedfloatSpeed corresponding to a unit-slope section of the curve.
paramcountintNumber of subdivisions; yields count + 1 events (at least 1).
parameasingEaseLikeEasing whose derivative drives the speed (name, :class:Easing, or callable).
paramtilint= 0Timeline (TIL) index assigned to every event.
Returns
listThe generated events in time order.