module: animations
this is a module which comes with pre made short animations which can be plugged into a longer pattern or animation
fizzle()
fizzle slowly turns off each pixel of the tree randomly
from animations import fizzle.fizzle
def main():
fizzle()
wipe(theta: float, alpha: float, color: Color, speed: float)
wipe a color from one side to the other, the angle is deterimined by theat and alpha in radians
from animations import wipe.wipe
def main():
wipe()
wipe_frames(theta: float, alpha: float, color: Color, frames: int = 45, fade: Color | None = None)
the prefered version of wipe, angle specified by theta and alpha in radians, it will take exactly frames amount of time to finish the wipe so more predictable than wipe. you can also add a fade color, once it has wiped
from animations import wipe.wipe_frames
def main():
wipe_frames()
wipe_wave_frames(theta: float, alpha: float, color: Color, frames: int = 45, lerp_frames: int = 20, lerp_fn: Callable[[float], float] = util.linear)
this will start pixels lerping to target color over lerp_frames amount of time, more of a wave than a wipe.
from animations import wipe.wipe_wave_frames
def main():
wipe_wave_frames()