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

Globe autorotates very quickly if the page is in background for a while #180

Closed
mighty-phoenix opened this issue Oct 6, 2023 · 3 comments

Comments

@mighty-phoenix
Copy link

Hey @vasturiano
If I switch to some other tab for a while after opening the globe, and switch back to it, the globe autorotates very quickly for a while.
Kindly see screen recording for reference.

Screen.Recording.2023-10-06.at.5.29.29.PM.mov

How can I disable this behaviour and allow the globe to keep autorotating at the same speed as before?
Quick help would be highly appreciated.
Thanks!

@mighty-phoenix mighty-phoenix closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@slavanga
Copy link

@mighty-phoenix I'm facing this issue too. did you find a solution?
@vasturiano any advice how to prevent this?

@vasturiano
Copy link
Owner

@slavanga you can pause rotation of the globe when you detect a loss of focus from the browser tab, using the visibilityChange event.

I presume you are already controlling the rotation of the globe in your app via controls().autoRotate = true, so this is an extension of that control.

@slavanga
Copy link

slavanga commented Nov 11, 2023

@vasturiano thank you for quick reply. setting autoRotate via the visibilityChange event does not work for me.

here's a reduced example showing the issue: StackBlitz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants