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

The globe spins slower in safari #28

Closed
ConsoleTVs opened this issue Apr 17, 2022 · 7 comments
Closed

The globe spins slower in safari #28

ConsoleTVs opened this issue Apr 17, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@ConsoleTVs
Copy link

ConsoleTVs commented Apr 17, 2022

Same configuration, globe spins faster in chrome/firefox than safari

@ConsoleTVs ConsoleTVs changed the title The globe spins faster in chrome than it does on safari The globe spins slower in safari Apr 17, 2022
@ConsoleTVs
Copy link
Author

Turns out is twice as fast for some reason lol;

workaround meanwhile:

// Detect browser
const isSafari = Boolean(
    navigator.vendor &&
      navigator.vendor.indexOf("Apple") > -1 &&
      navigator.userAgent &&
      navigator.userAgent.indexOf("CriOS") == -1 &&
      navigator.userAgent.indexOf("FxiOS") == -1
  );

// The onRender property on the configuration: (just double the value for safari)
state.phi = phi += isSafari ? 0.006 : 0.003;

@shuding
Copy link
Owner

shuding commented Apr 22, 2022

That's weird, is it possible that there's some FPS-limiting (requestAnimationFrame) configuration in your Safari browser?

@ConsoleTVs
Copy link
Author

I'll check but I have never tweaked those settings, so they should be the default... Does it work well for you?

@shuding
Copy link
Owner

shuding commented Apr 23, 2022

Yeah it works well for me

@ConsoleTVs
Copy link
Author

Alright, ill make some tests and see if I come up with anything

@Mayank-Sh07
Copy link

Mayank-Sh07 commented Apr 14, 2023

This could be related to safari not supporting high refresh rates in older versions. A possible fix for such animation speed differences would be to compute the delta time as suggested in #13. Here's a good read for the same.

Ensuring Consistent Animation Speeds

@shuding shuding added the bug Something isn't working label May 29, 2023
@shuding
Copy link
Owner

shuding commented May 29, 2023

Tracking in #13.

@shuding shuding closed this as completed May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants