ASCII Terminal Animation Package
Project description
bruhanimate
bruhanimate offers a series of files to aid in rendering out animations in the terminal. This is heavily inspisred by the Asciimatics package. While Asciimatics is the end-all be-all for termianl animations, I figured it would be good practice to go ahead and attempt something like this myself.
NOTE: This currently only runs on WINDOWS OS currently
Usage
This is not complete, but currently offers the ability to render out background-effects. There also exists renderers that can render out images to the screen, but these need to be modified following the implementation of the Effects
class. A great example of the effects can be found in demo.py
. Here is a what a simple example might look like.
"""
Here is a simple program that uses the EffectRenderer to render out one
of the prebuilt effects to the terminal.
"""
from bruhanimate.bruhscreen import WinScreen
from bruhanimate.bruhrenderer import *
# Define a function that the screen warpper function will call
def render_stars(screen, frames, time, effect, background, transparent):
# Create the renderer
renderer = EffectRenderer(screen, frames, time, effect, background, transparent)
# Change the exit messages if you want, wipe tells the renderer to wipe the final
# animation frame before displaying the exit messages.
renderer.set_exit_stats(" Animation Frames Completed ", " Press [Enter] to leave ", wipe=True)
# Set the intensity if you want, the higher the intensity, the more stars.
# Intensity can be set for the Noise and Stars Effect, <= 200 is a good spot.
renderer.effect.update_intensity(200)
# Run the animation
renderer.run()
# Add an input() to catch the end of the enimation
input()
# Now that we have a funciton to render the animation, let's
# create a screen and call the function
# function fram time effect bk img
WinScreen.show(render_stars, args=(100, 0.05, "stars", " ", None))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bruhanimate-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 004ca11a4c7123f1031c578ec3378de8706641e364958e9fb34bfb1a4e55a785 |
|
MD5 | a0bece3d1ec871136810d2b5c7656f27 |
|
BLAKE2b-256 | b0798a2910a614d7c70227dd1ba7f53f404926ca90994d14e59161655809e428 |