Replies: 1 comment 2 replies
-
Ok i think i have partialy solved the problem by creating my own loader that uses the preloadFont loader from troika-three-text.
Then we can use it with useLoader like this:
The "path/to/font" string can be used by any instance of drei's Text component. It would be nice to have a complete loader that can return progress and errors but for that i would need some help :P Please let me know if this approach is wrong or there are better alternatives. Thanks. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi i would like to know how to preload fonts for the Text component.
I would like to present the user with a loading screen like with the Suspense component.
It would be perfect to be able to use Suspense and useLoader for this...
How should i achieve this?
There is not much documentation about the Text component or i am missing something?
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions