Hi,
This is my first message here. I have been using GSAP for a project : https://sample-card-ui.netlify.app/
The animations run smoothly on PC, but trying it on a few mobile devices showed a real problem (try it yourself !)
Do you have any suggestions ? With Chrome Developer tools I tried running it with CPU throttling (x6) and it was still good.
The code is accessible on the github link in the app (it is not perfect code. I am a Junior). Here's the file with the gsap timeline : https://github.com/ledhad/sample-card-ui/blob/master/src/components/cards/Card1.tsx
My ideas so far :
- I don't think this is the CPU of the mobile I have tried since one of them was a pretty decent smartphone and it had the same non smooth problem.
- Chrome Developer Tool shows quite a few layout shifts. That might be it. But I don't see how I could avoid layout shift in that case.
- I have added "rotation : 0.01" in the gsap timeline. I saw somewhere that it could help smoothness.
I would love some replies so that I can do things better for the users.