xylis Posted June 1, 2024 Posted June 1, 2024 spring ease feels very stiff when i use it with Gsap flip, I have added a simple demo of a single transitioning between 2 heights with flip to showcase the issue. Click on the green div to see the transition. https://stackblitz.com/edit/vue-x7dbrl?file=src%2FApp.vue
mvaneijgen Posted June 1, 2024 Posted June 1, 2024 Hi @xylis welcome to the forum! There are a few properties you're better off not animating, because some of them cause a browser repaint which is very resource intensive on the browser. Animating transform properties are much more performant, in your case you can set scale: true on the flip setup, below from the docs https://gsap.com/docs/v3/Plugins/Flip/ Quote Boolean - by default, Flip will affect the width and height CSS properties to alter the size, but if you'd rather scale the element instead (typically better performance), set scale: true. This is just a demo of course, so I'm not sure what it is you're trying to do, but in this case you don't even need flip if you just use a gsap tween, but again you're better of not animating the height of an element. Hope it helps and happy tweening! See the Pen BaeWwYe?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen.
Rodrigo Posted June 1, 2024 Posted June 1, 2024 Indeed as always, Mitchel hit the nail right in the head, is far better in this case to use scale for this: https://stackblitz.com/edit/vue-hzx8ql?file=src%2FApp.vue Hopefully this helps. Happy Tweening!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now