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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d5d97a36f8297d3ea8ad22b0d23a8b32c0500b4282daa6aece6ca2c1bf83973 |
|
MD5 | 38f487c6369e3d7a8fdd482a202f770a |
|
BLAKE2b-256 | ebe4cdba8dd2cfc7654d5e995569ab4eba681e6ff2c44f242a59ec41d386ead5 |