leva
leva copied to clipboard
Hiden a specific panel
Hi everyone,
I facing a problem while trying to use Leva as a controller for meshes.
I have an array of mesh ... and, I want to control it with Leva. Each mesh will be rendered as a component via map
meshes.map((item, index) => <ComponentUseLevaInside isShowLeva={true} />
The problem here, I will have multiple Leva panels showing on the screen ... but I just want to show 1 panel at a time (via the isShowLeva prop).
I don't know how to hide the Leva panel ...
Do you have to render every ComponentUseLevaInside?
Assuming each child has their own useControls() statement inside of it, could you just use a React switch to determine which child to render?