Skip to content

Added an optional config the R3F sheet context#502

Open
ivoilic wants to merge 1 commit into
theatre-js:mainfrom
ivoilic:main
Open

Added an optional config the R3F sheet context#502
ivoilic wants to merge 1 commit into
theatre-js:mainfrom
ivoilic:main

Conversation

@ivoilic
Copy link
Copy Markdown

@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.

@vercel
Copy link
Copy Markdown

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
Copy Markdown

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