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

Allow the users to control the max fps of the engine #16075

Merged
merged 4 commits into from
Jan 16, 2025
Merged

Conversation

deltakosh
Copy link
Contributor

Users now can set engine.maxFPS to set an upper limit to the rendering speed

You can even set it to < 1 values (like 0.5 to render every 2 seconds).

I also introduced a boolean to keep the engine pumping messages while not rendering (and I used it for the screenshot system)

@deltakosh deltakosh enabled auto-merge (squash) January 16, 2025 16:28
@bjsplat
Copy link
Collaborator

bjsplat commented Jan 16, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@RaananW
Copy link
Member

RaananW commented Jan 16, 2025

Build falls because of webxr. Need to make some changes to the xr session manager.
I guess it makes no sense using this feature in XR, as this will only cause headaches.

@deltakosh
Copy link
Contributor Author

Build falls because of webxr. Need to make some changes to the xr session manager. I guess it makes no sense using this feature in XR, as this will only cause headaches.

Correct, I did the fix.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 16, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 16, 2025

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a small question, and - this will add some size to the ThinEngine as well. I know there is no way of adding this feature just to engine and webgpu engine, but we need to know the ThinEngine will have this code as well.

@RaananW
Copy link
Member

RaananW commented Jan 16, 2025

small note - ignore the error for now, it seems like there was a short CDN downtime which caused this.

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Jan 16, 2025

@deltakosh deltakosh merged commit 2ac3155 into master Jan 16, 2025
13 of 14 checks passed
@deltakosh deltakosh deleted the max-fps branch January 16, 2025 21:57
@shakrov
Copy link

shakrov commented Jan 27, 2025

A little thing - we got getFps and maxFPS - I guess better if or FPS all capital or Capital the first, right now it looks like it havent standart

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

Successfully merging this pull request may close these issues.

5 participants