-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support slide animations and transitions #364
Comments
Hey, thanks! Love to hear people are using presenterm on conference presentations ❤️. Adding transition effects sounds good to me! I wouldn't go far out and support lots of them though, just some simple fade in/out or a sort of "swipe horizontally to next/previous slide" would make sense. I'm not sure how this works around images though. I can imagine a swipe animation would work but a fade in/out one may not work / may only work under the kitty graphics protocol. |
Thanks for the reply :) I totally agree, adding simple transitions would be more than enough. Have you had time to look at how |
Hi 👋🏼, Neat project! I looked around for something similar a couple of years ago but came up empty. I originally envisioned tachyonfx as having multiple backends, but the existing code (extracted from glim) was already tightly coupled with ratatui, and going straight for multiple backends felt a bit premature. Maybe it could be worth revisiting, but in any event - feel free to take whatever holds up to scrutiny or looks useful. tachyonfx is pretty simple: it mostly works as a "post-processing" step, i.e. the effects are applied after the widgets have been rendered. As such it expects a shared intermediate screen buffer to read from and write to. While effects can run "standalone", they are typically composed of multiple effects, usually employing a Effects are applied to a given area. let margin = Margin::new(1, 1);
let border_text = AllOf(vec![Outer(margin), Text]);
let border_decorations = AllOf(vec![Outer(margin), Not(Text.into())]);
parallel(&[
sequence(&[
with_duration(short_duration, never_complete(fx::dissolve(0))),
fx::coalesce((duration, BounceOut)),
]),
fx::fade_from(Dark0, Dark0, duration)
]).with_cell_selection(border_decorations) I'm quite happy with how CellFilters worked out. They bring a lot of flexibility without much complexity. The only "optimization" tachyonfx performs is that some effects memoizes the previous cell's color transformation. This speeds up e.g. fade effects, avoiding many identical RGB->HSL->RGB translations. |
Hey again @junkdog, thanks for the reply. Things are more clear after diving into the code a bit (hint: #10) and your explanation!
Very interesting, is it a generic buffer or something like Ratatui's I'm wondering if it would be somehow possible to use |
Hello 👋🏼 First of all thanks a lot for the great presentation tool, I'm currently using it for my upcoming EuroRust talk :)
One thing that I felt missing (after switching to
presenterm
from Google Slides (ugh)) is the slide transitions such as fade in/out. I know this possible to do in the terminal thanks to thetachyonfx
project. I'm not aware of any other library.However,
tachyonfx
is built for Ratatui applications and I see thatpresenterm
only depends oncrossterm
. But I believe it still should be implementable. I'm interested in working on this, so let me know what you think!Inviting @junkdog to the discussion as the author of
tachyonfx
.The text was updated successfully, but these errors were encountered: