Replies: 1 comment
-
https://threejs.org/docs/#manual/en/introduction/How-to-update-things you need to flag the material if it gets a new texture useEffect(() => { keep in mind though using shadermaterial isn't ideal. i'm not even sure if that can work at all. use shaders like this: https://codesandbox.io/s/threejs-journey-ni6v4?file=/src/shaders/FireflyMaterial.js it's cleaner. |
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.
-
Hi Folks,
this is my sandbox:
https://codesandbox.io/s/three-js-uluru-texturemap-forked-mq6ni
basically i want to use a drop down list to switch the texture image of the rendering. I can see the state has been passed to the function, but the texture is not changing. I am not sure whats the right way to do this.
Thanks for the help!
Beta Was this translation helpful? Give feedback.
All reactions