Replies: 2 comments 1 reply
-
@vvrnck would you be able to set up a sandbox? Yes, if you look at all arguments from |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dbismut Sure! I added it on the main issue |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Greetings all!
So, a little bit of contextualization first. I'm totally new to three.js and decide to give it a try to learn, but the examples and documentations are kinda old and unless you know what are you doing there are not much else to do, which lead me to find react-three-fiber, drei and so on (thank you guys, btw!).
I'm Currently trying to use leva to configure a three object that is saved on zustand store.
I'm using the select input to work like a preset (meshStandardMaterial, meshPhongMaterial, etc) that will render specifics controllers to each type of material.
It is working fine until I unmount the component and mount it again. (The material props is always a three standard material)
Lets say that I changed to a meshNormalMaterial, my three object is updated and it works fine, so i close leva ui, but when I open it again the object have the correct material (standardMaterial) but looks like the value on leva ui is not being setted or is cached (in this example it would show meshNormalMaterial).
Sandbox: https://codesandbox.io/s/sleepy-cloud-3zk8rx?file=/src/MaterialController.js
Am I missing something in how to use it? Hope you guys can help me and thanks again for those amazing libs!
Beta Was this translation helpful? Give feedback.
All reactions