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

Float does not work with on demand rendering #2033

Closed
AaronClaes opened this issue Jul 16, 2024 · 3 comments · Fixed by #2034
Closed

Float does not work with on demand rendering #2033

AaronClaes opened this issue Jul 16, 2024 · 3 comments · Fixed by #2034
Labels
bug Something isn't working released

Comments

@AaronClaes
Copy link
Contributor

  • three version: 0.166.1
  • @react-three/fiber version: 8.16.8
  • @react-three/drei version: 9.108.4

Problem description:

The Float component does not work when the frameloop is set to demand.

Relevant code:

function Component() {
	return (
		<Canvas frameloop="demand">
			<Float>
				<Box />
			</Float>
		</Canvas>
	);
}

invalidate is not being called inside the Float component.

Suggested solution:

Call invalidate inside the Float component useFrame

Copy link

🎉 This issue has been resolved in version 9.109.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@CodingReaper1
Copy link

i have 9.112.0 version and it is still not resolved

@AaronClaes
Copy link
Contributor Author

i have 9.112.0 version and it is still not resolved

Did you pass the autoInvalidate prop as mentioned in the PR? That should fix the problem.
We decided not to make it auto invalidate by default because this might not be the expected behavior and would break certain cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants