How to load texture in React-Three-Fiber synchronously? THREE.WebGLRenderer: Texture marked for update but no image data found. #2638
Unanswered
MeRahulAhire
asked this question in
Q&A
Replies: 1 comment 8 replies
-
loading in react is generally done through suspense. all fiber loaders use this caching solution https://github.com/pmndrs/suspend-react if you know when your texture loads and when it has completed you can suspend. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm using Openlayers Canvas as a
canvasTexture
to my mesh as followingBut the problem is in openlayers I'm trying to load a 5MB Webp image which takes some time to load and
Three.js
wants to load image instantly and doesn't wanna wait for it which is causing it to render unreliably.Sometimes, the texture does get loaded but most of the time, I'm getting this error in console.
THREE.WebGLRenderer: Texture marked for update but no image data found.
My question is how do I make R3F to wait till the image is loaded? Need your help 🙏.
Beta Was this translation helpful? Give feedback.
All reactions