Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Animations #69

Closed
ItsJonQ opened this issue Oct 12, 2017 · 4 comments
Closed

Animations #69

ItsJonQ opened this issue Oct 12, 2017 · 4 comments

Comments

@ItsJonQ
Copy link
Contributor

ItsJonQ commented Oct 12, 2017

Interesting comparison of various React animation solutions:

https://www.freshtilledsoil.com/whats-the-most-developer-friendly-react-animation-library/

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented Oct 13, 2017

Note: TransitionGroup doesn't support staggering at the moment. There's a Feature Request for it, as well as an open PR:

reactjs/react-transition-group#73

Maybe we can enhance the AnimateGroup component (introduced in #79) with staggering? 🤔

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented Oct 19, 2017

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented Oct 19, 2017

Experimenting here:
https://github.com/helpscout/blue/tree/animejs

Thoughts so far: AnimeJS is VERY cool… but there's some… trickiness when it comes to combining opacity with other transform based animations (due to easing coordination)

An alternative idea would be to not use animejs, and enhance the current Animate component's CSS animations to support elastic bezier curves. That way, we can better coordinate something like fade with bounceDown.

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented Oct 19, 2017

Elastic with CSS animations is very promising! I find that it promises better fine-grain control when combining various animation types.

Example of staggered opacity (linear) + height/transform (elastic):

screen recording 2017-10-19 at 07 29 pm

Transition details:

  transition:
    opacity 400ms linear 0ms,
    height 300ms cubic-bezier(0.68, -0.55, 0.265, 1.55) 100ms,
    transform 200ms cubic-bezier(0.68, -0.55, 0.265, 1.55) 0ms;

Above cubic-bezier formula from:

http://easings.net/#easeInOutBack

Solid buttery 60fps, even with height related repaints. Profiled using Chrome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant