Skip to content
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

Implement animation tweening API powered by Tween.js, Popmotion, or some other lib. #160

Open
trusktr opened this issue Jan 10, 2018 · 0 comments
Labels

Comments

@trusktr
Copy link
Member

trusktr commented Jan 10, 2018

Popmotion has progressed a lot as an animation library since it came out! It's not just a tweening library anymore. Tween.js is nice, but it's just a tweening library. Popmotion has physics!

Let's add an API that makes it easy to animate Node properties, powered by Popmotion behind the scenes.

Currently, using a tween library directly is much too verbose. For example, see the JavaScript in this animated button demo: https://codepen.io/trusktr/pen/rpegZR

We can eliminate a ton of that boilerplate code by providing a nice animation API. The result will be something that is as simple as working with CSS animations that can be started, stopped, and cleaned up simply by adding and removing classes. In this case, the API will be JavaScript-based, but similar in the sense that you just tell your object what state it should go to, and the stopping and clean up of animations is abstracted behind the scenes.

In CSS, selectors are associated with states. In the future, it might be possible to use CSS custom properties to achieve a custom CSS-based approach.

@trusktr trusktr changed the title Implement animation tweening with Popmotion. Implement animation tweening API powered by Tween.js, Popmotion, or some other lib. Jan 4, 2019
@trusktr trusktr removed hard labels Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant