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

Timer: Add usePageVisibilityAPI ctor parameter. #30522

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 14, 2025

Related issue: #30497

Description

As requested in #30497, the PR introduces an optional ctor parameter that controls the usage of the Page Visibility API to avoid large time delta values in inactive tabs. The default is true but it can be set to false if this mechanism isn't wanted.

@Mugen87 Mugen87 modified the milestones: r175, r174 Feb 14, 2025
@Mugen87 Mugen87 merged commit 9c01215 into mrdoob:dev Feb 14, 2025
11 checks passed
@mrdoob
Copy link
Owner

mrdoob commented Feb 18, 2025

Hmm, how about something like this?

const timer = new Timer();
timer.connect( document );
timer.disconnect();

pmndrs/three-stdlib@5302d15

To avoid the #20575 issue...

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Feb 18, 2025

Since we use the connect()/disconnect() pattern in all controls now, I think we can adapt the same approach in Timer as well 👍 .

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

Successfully merging this pull request may close these issues.

2 participants