render/ambient_drift library
Ambient background drift (motion brief §4.13: the Liquid Glass family's "vivid animated background", spec §5.3 #2).
A drifting backdrop (BackgroundSpec.driftPeriodMs > 0) moves on a
cycle of ≥ 40 s. It decelerates to a stop over 2 s once 8 s pass
without input, resumes over 1 s on the next touch, and is off when
ambient motion is off (Reduce Motion, effects tier off). When off, the
background shows a static frame, and glass keeps refracting it.
AmbientClock is the shared drift time painters read at paint time; AmbientDrift drives it with one ticker that only runs while a drifting backdrop is showing and moving.
Classes
- AmbientClock
- The drift time (seconds of motion so far). Notifies on every advance.
- AmbientDrift
- Drives AmbientClock while theme's backdrop drifts and enabled.