Ilja Posted January 17, 2021 Share Posted January 17, 2021 I assume that due to gsap using requestAnimationFrame its fps gets dropped to like 30fps when mobile device is in low power mode. I wanted to ask if there are mechanisms that would allow to bypass this and keep ticker running at 60fps in these cases? Link to comment Share on other sites More sharing options...
ZachSaucier Posted January 18, 2021 Share Posted January 18, 2021 Hey Ilja. It's not good practice to do this. The mobile device is purposefully setting the FPS lower to save on battery so you should respect its request. Link to comment Share on other sites More sharing options...
GreenSock Posted January 18, 2021 Share Posted January 18, 2021 Yep, I totally agree with Zach. And I'm not aware of any way to force the browser to behave differently and not allow it to honor the device's throttling down of requestAnimationFrame. If there were, every web developer would probably do it, and it'd render the "feature" pointless What's annoying is that (at least in some versions of iOS) Safari throttles things that are inside an iframe until the user interacts with any content in that iframe. So even though the device may not be in "power saving" mode, there are some conditions where the browser forces a throttling of screen refreshes/repaints. 1 Link to comment Share on other sites More sharing options...
Ilja Posted January 21, 2021 Author Share Posted January 21, 2021 I understand that, but in general is there something in gsap that allows to bypass this? I am using gsap to run animations and some scroll behaviour in an ios based game built with pixi js. Being a game it doesn't feel that nice running at 30fps compared to native games that remain at 60fps. The only work around I have at the moment is playing this off as a feature and informing user that fps is capped to 30 in low power mode, but ideally it would be great to keep it 60. Link to comment Share on other sites More sharing options...
GreenSock Posted January 21, 2021 Share Posted January 21, 2021 16 minutes ago, Ilja said: I understand that, but in general is there something in gsap that allows to bypass this? As I mentioned earlier, no, there is no way I'm aware of to do that. If there were, every web developer would probably do it, and it'd render the battery-saving functionality pointless. 1 Link to comment Share on other sites More sharing options...
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