My experiments with animation in the terminal, using ANSI escape sequences.
This project is meant to be a more structured approach to anim.py, which implements effects such as transparency, colour gradients, fade-in, and movement.
termanim.ansi
: The ANSICodes class lists useful ANSI codes for operating on the terminal screen.termanim.term
: The TermScreen class gives an interface for drawing to the terminal screen, with coloured text. The TermScreenRGB class allows the use of 24 bit RGB colour, with transparency effects. The TermThings class conveniently creates and modifies drawable text and box objects.termanim.anim
: The Effects class creates animation effects, which act on drawable objects and generate animation frames.
termanim.shm
: A demo animation of a block performing simple harmonic motion on the screen. Runpython3 -m termanim.shm
.
termanim.shmRGB
: A demo animation of simple harmonic motion, this time with RGB colours. Runpython3 -m termanim.shmRGB
.
termanim.blocks
: A demo animation of colourful moving blocks. Runpython3 -m termanim.blocks
, orpython3 -m termanim.blocks -h
for more options.