ChrisBuilds / terminaltexteffects

TerminalTextEffects (TTE) is a terminal visual effects engine, application, and Python library.
https://chrisbuilds.github.io/terminaltexteffects/
MIT License
2.6k stars 43 forks source link

can the lib be running with textual or other libs? #12

Closed b166erbot closed 1 month ago

b166erbot commented 1 month ago

this lib is really beautiful! its awesome! can it be used with textual, asciimatics or asciinema? i can't use labels to assign this issue as a question.

ChrisBuilds commented 1 month ago

All of the demos were recorded with asciinema, so definitely yes for that one.

As for Textual, the effects are all iterators that return strings. Any widget that can display a string should work. You may need to manually set the Canvas dimensions to match your Textual widget. I'm sure that will require a bit of trial and error to match up. Resizing dynamically definitely wouldn't work as the effects are built based on an internal representation of the terminal grid coordinates.

I don't know anything about asciimatics, but I'm sure the concept is the same. You get strings from the effects. Just drop those where ever you need and update the respective widget.