You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since useEnvironment is based on useLoader it should be possible to provide a preload and clearing function.
At the moment, it would be quite a bit of trouble to preload or clear environment files because some logic is involved in selecting the correct loader based on the file extension.
I worked out a first version in a Drei fork and it works great so far, I will open a PR soon.
The only limitation at the moment would be that you cannot preload gainmaps, because that loader requires the renderer to be set.
This should not be an issue as long as it is documented.
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like:
Since useEnvironment is based on useLoader it should be possible to provide a preload and clearing function.
At the moment, it would be quite a bit of trouble to preload or clear environment files because some logic is involved in selecting the correct loader based on the file extension.
Suggested implementation:
Similar to the other hooks based on useLoader:
I worked out a first version in a Drei fork and it works great so far, I will open a PR soon.
The only limitation at the moment would be that you cannot preload gainmaps, because that loader requires the renderer to be set.
This should not be an issue as long as it is documented.
The text was updated successfully, but these errors were encountered: