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

feat: add clear and preload function to useEnvironment #2079

Conversation

AaronClaes
Copy link
Contributor

@AaronClaes AaronClaes commented Aug 29, 2024

Closes #2076

Why

Pull request for the following feature: #2076

What

I added a clear and preload function for useEnvironment based on useLoader.

I also restructured parts of the hook to be able to reuse them in the clear and preload functions, to prevent duplicate code.

The only limitation is that gainmaps cannot be preloaded, but this is stated in the updated documentation.
The reason is that their loader requires the renderer to be set, which is not possible. An error will be thrown when attempting to preload a gainmap.

Checklist

  • Documentation updated
  • Ready to be merged

Copy link

vercel bot commented Aug 29, 2024

@AaronClaes is attempting to deploy a commit to the Poimandres Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codesandbox-ci bot commented Aug 29, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@CodyJasonBennett CodyJasonBennett merged commit 73f5587 into pmndrs:master Sep 3, 2024
3 of 4 checks passed
Copy link

github-actions bot commented Sep 3, 2024

🎉 This PR is included in version 9.112.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

README.md Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clear and preload function for useEnvironment
3 participants