Skip to content

Conversation

@benwest
Copy link

@benwest benwest commented Oct 24, 2023

Hi! Very good and wonderful library, I made some changes to suit my project, maybe they're helpful?

  • Return type is now inferred when passing a bare Promise
  • preload now returns the cached Promise, so you can know when preloading is done

I would love to see the second change in particular propagate out to @react-three/fiber's useLoader, drei's useTexture etc! It allows more strategic preloading of assets (wait for high-priority assets to load before loading others).

This works in my project but I definitely haven't tested it exhaustively.

@vicimpa
Copy link

vicimpa commented Nov 4, 2024

Approve this PR please. I need this futures.

@joshuaellis
Copy link
Member

Hey thanks for the contribution, you've changed a lot just to make return a stronger type – can you elaborate on why you've made the much larger changes?

@benwest
Copy link
Author

benwest commented Nov 7, 2024

no, i barely remember doing this! 🙃

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.

3 participants