Feature Request: Loop effects for existing text #18
Replies: 10 comments
-
Can you provide an example using the rgbprint library? |
Beta Was this translation helpful? Give feedback.
-
Yeah sure. I'm using this:
The actual
The The only feature that is absent from both rgbprint and tte that would be cool, would be allowing more gradient stops, so you could do a spectral/rainbow gradient animation, but maybe you can achieve that with only three colours, I just wasn't able to when I was playing around with it in tte. |
Beta Was this translation helpful? Give feedback.
-
So you don't intend to do other work while this is printing? You'll be stuck in the while loop. If that's the case, a simple effect which displays a gradient, with an option to travel the gradient wave, would be easy to make. I like the idea. Look for that effect in the next update. As a note, TTE gradients support an arbitrary number of stops/steps. However, there are currently no effects which produce a simple gradient shift appearance and almost all effects support a directional gradient for the final result which limits which part of the spectrum is actually displayed for a given character. I'll build an effect which cycles over a gradient with an option to shift the gradient across the text. I can experiment with an option to run indefinitely when used as a library, but I'll likely not make that option available from the command line. I'll update this issue when there's been progress. Thanks for the feedback and ideas. |
Beta Was this translation helpful? Give feedback.
-
Yeah exactly :-) My project is pretty niche, and still very much a work in progress; I've integrated it into the twitch bot I'm using for my channel, to print events, like announcements, subscriptions, etc. Later, once that's done, eventually I'd love to write a terminal chat client, like twitch-tui, that uses tte.
Awesome, happy to hear! Can't wait to play with it. |
Beta Was this translation helpful? Give feedback.
-
0.10.0 has been released and includes a new effect called ColorShift which can be used to accomplish your goal. Check out the ChangeBlog for the release and give it a try. Drop an update in here and if there's nothing else, I'll close the issue. Thanks. Here's an example using the ColorShift effect with a single line input, radial travel direction, and infinite looping. from terminaltexteffects.effects.effect_colorshift import ColorShift
from terminaltexteffects.utils.graphics import Gradient
text = "EXAMPLE" * 10
effect = ColorShift(text)
effect.effect_config.travel = True
effect.effect_config.travel_direction = Gradient.Direction.RADIAL
effect.effect_config.loop_gradient = True
effect.effect_config.cycles = 0
effect.terminal_config.canvas_height = 1
with effect.terminal_output() as terminal:
for frame in effect:
terminal.print(frame) Adjust the |
Beta Was this translation helpful? Give feedback.
-
Hey @ChrisBuilds I actually checked in a few times leading up to 10.0 and noticed you were quite busy! I was wrapping up a lot my own project, so took a little bit to finally have a play with it, but after little configuring I got a very soothing effect, looks sooo good; just what I was imaging when I made the feature request, so thankyou :-) Also cookbook looks great, will have to play with that kinda stuff more before long! |
Beta Was this translation helpful? Give feedback.
-
Glad to hear it. The idea of infinitely looping effects is cool. I'll need to consider which existing effects could be modified and what new effects could be made explicitly to support use cases such as yours. Thanks for the issue. I'm going to move this into a discussion. |
Beta Was this translation helpful? Give feedback.
-
Haha, it's funny you mention that, because I actually already played around with some of the existing effects in loops before I initially posted this feature request. I was trying to get a bit of a cyberpunk-glitchy kinda vibe, just for fun though, cause its not really applicable to what I'm doing. I was primarily experimenting with looping the VHS, error correct and decrypt effects, although looking through the effects showroom I think the unstable effect is also a good candidate for that as well (minus the explosion and reassembly attributes). I think the glitch attributes of the VHS effect are promising, they look so damn good, but minus the final noise and gradient wave attributes. For the error correct, I kind of got that looking good with a loop (albeit on a single line of text, so might not translate well to a block of text), with a sleep between loops. The decrypt looked cool, but was took too long; it would probably look cool if it was just random characters switching to an encrypted character for half a second and then decrypting back again. I think the main attributes I imagine finding handy would be a delay attribute for how long to sleep between loops, and maybe also a boolean random delay attribute that modifies the delay value to produce a more organic looking loop. |
Beta Was this translation helpful? Give feedback.
-
All good ideas. The challenge at this point is the original intention for TTE as to be a terminal toy, so most of the effects have been designed to that goal. They have a progression to them that would need to be significantly refactored. It's not impossible, but will require time. That being said, I will keep certain newer ideas in mind when building future effects. Looping, optional phases, etc. will be present going forward. As I get comfortable with that design pattern, I may be able to jump back into older effects and refactor more readily. |
Beta Was this translation helpful? Give feedback.
-
Yeah that makes, well I'm looking forward to contributing once I've learnt enough Python to not make a mess of it :-) |
Beta Was this translation helpful? Give feedback.
-
Hello again :-)
I would love to see some basic effects that could be used in loops on text that has already been printed with one of the existing effects.
For example, after using the
Beams
effect to print some text, a basic effect that loops a gradient colour could be applied, using attributes similar to existing ones, likefinal_gradient_stop
andfinal_gradient_direction
; and perhaps agradient_loops
, or similar, attribute to define the number of loops.There is a feature similar in rgbprint, which I'm using in combination with terminaltexteffects now, but the tte engine is so powerful would be cool to use that instead.
Beta Was this translation helpful? Give feedback.
All reactions