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

WebGPURenderer: Define setAnimationLoop() as default in examples #27839

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Feb 28, 2024

Related issue: #24755

Description

Using requestAnimationFrame() can generate a cascade effect in the first frames rendered, as all requests are waiting for the backend to be initialized, and they will all be fired in a single frame. The ideal is to use renderer.setAnimationLoop() to avoid this problem.

@sunag sunag marked this pull request as ready for review February 28, 2024 16:11
@sunag sunag added this to the r162 milestone Feb 28, 2024
@sunag sunag merged commit c4c01c3 into mrdoob:dev Feb 28, 2024
11 checks passed
@sunag sunag deleted the dev-setAnimationLoop branch February 28, 2024 16:31
@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 28, 2024

When migrating the examples to WebGPURenderer at some point, we should adapt this style everywhere, see #15233.

That said, I think we should still guarantee that a custom animation loop is technically possible since probably not all devs want to be forced into setAnimationLoop().

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