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

Added an optional config the R3F sheet context #502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivoilic
Copy link

@ivoilic ivoilic commented Nov 20, 2024

This PR adds an optional config to the sheet context in the R3F package with the option for a namespace prefix. When using the library I like the ability to group objects by namespace but it's tedious to do that for ever object in a scene. The SheetProvider seemed the most sensible place to add this option and I opted to make it a whole config so it could be expanded in the future to include other options.

<SheetProvider config={{namespacePrefix: "3D Scene"}} sheet={getProject('Demo Project').sheet('Demo Sheet')}>

In the future, it might make sense to rename SheetProvider to R3FSheetProvider, or something similar, to avoid confusion from users who might want to use the provider outside of fiber.

Note: I was not able to properly setup the repo because I encountered this error when trying to run yarn: Workspaces can only be enabled in private projects.. I don't normally use yarn and I'm not sure what the issue is.

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
theatre-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 5:39am

@CLAassistant
Copy link

CLAassistant commented Nov 20, 2024

CLA assistant check
All committers have signed the CLA.

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