/termanim

Experiments with animation in the terminal, with python

Primary LanguagePython

termanim

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.

modules

  • 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.

demos

  • termanim.shm : A demo animation of a block performing simple harmonic motion on the screen. Run python3 -m termanim.shm.

SHM

  • termanim.shmRGB : A demo animation of simple harmonic motion, this time with RGB colours. Run python3 -m termanim.shmRGB.

SHMRGB

  • termanim.blocks : A demo animation of colourful moving blocks. Run python3 -m termanim.blocks, or python3 -m termanim.blocks -h for more options.

BLOCKS