PaulWagener / leptos_animation

25 stars 4 forks source link

On whether FLIP animations suit this crate #2

Open GabrielBarbosaGV opened 1 year ago

GabrielBarbosaGV commented 1 year ago

Hello, and good day!

I would like to know if a FLIP (First, Last, Invert, Play) animation such as the one implemented in this comment would suit this crate. Although it might, what makes me wonder is that leptos_animation uses the tweened signal approach, which differs from the typical FLIP technique. If it does suit this crate, I would like to open a PR with the changes, but, if it does not, I would implement it in a separate crate.

Many thanks!

PaulWagener commented 1 year ago

This crate is useful for animating things that CSS transitions cannot do (such as stuff drawn on a canvas).

If an animation can be done with CSS transitions I would actually recommend against using this crate as the CSS technique will likely be more performant.

The FLIP technique seems to be used in combination with CSS transitions which are not the focus of this crate. I definitely think there is room for a separate leptos_transition crate which focuses on working with CSS transitions and the FLIP technique.