Module indicator
Expand description
The cadence of looping indicators: a spinner, a tab’s busy arc, a sweeping bar.
An indicator only says “still working”; it does not need the display’s
full refresh to say it. It moves in steps of INDICATOR_STEP and
repaints (damages its own bounds, presents) only when its step changes,
so one busy mark on screen costs a few frames a second instead of every
refresh. Under reduced motion it stands still (EffectiveMotion::loops).
Constants§
- INDICATOR_
STEP - One step of a looping indicator: 30 a second.
Functions§
- indicator_
elapsed - Time since
epochat the start of the stepnowfalls in: what an indicator draws, so its pose changes once per step. - indicator_
phase - Where in a loop
periodlong an indicator stands atnow,0..1, taken at the start of the stepnowfalls in. - indicator_
step - The step
nowfalls in, counted from the indicator’sepoch. - next_
indicator_ step - When the step after the one
nowfalls in begins.