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

Scene prop in <Canvas> does not work #2974

Closed
Omxjep3434 opened this issue Aug 16, 2023 · 1 comment · Fixed by #2975
Closed

Scene prop in <Canvas> does not work #2974

Omxjep3434 opened this issue Aug 16, 2023 · 1 comment · Fixed by #2975
Labels
bug Something isn't working

Comments

@Omxjep3434
Copy link

Omxjep3434 commented Aug 16, 2023

I have a custom scene class and want to use it in r3f instead of the default scene.

From the Canvas documentation, it seems this should work:
<Canvas scene={new MyScene()} />

However, this is not working. I examined the code, and web/Canvas.tsx does not pass in the scene prop to root.configure().

If this is intentional, what is currently the best way to use a custom class that derives from THREE.Scene?

@CodyJasonBennett
Copy link
Member

It was an oversight this wasn't possible without a custom canvas. Fixed in v8.13.7.

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

Successfully merging a pull request may close this issue.

2 participants