replacing textures #1258
Unanswered
carmandale
asked this question in
Q&A
Replies: 1 comment
-
do you have a sandbox? i think it's probably not that useLoader call but something's calling setState within the render function elsewhere. |
Beta Was this translation helpful? Give feedback.
0 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.
-
I have created a model.js through https://gltf.pmnd.rs. everything works well.
I want to replace the textures, so I am importing the pictures and using something like this:
const MidgroundTrees3Tex = useLoader(THREE.TextureLoader, MidgroundTrees3);
but I get an error when the site loads:
Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
Beta Was this translation helpful? Give feedback.
All reactions