I'd like to hide a folder from the dat.gui
's controls. By hide I mean hide, not close.
I don't want to let the user see the folder name nor let him open it when hidden.
I'll control the visibility of the folder programmatically based on values of other options.
For example:
var visibility = {showFolder: true, other: 1}
var gui = new dat.GUI();
var folder = gui.addFolder('Name');
folder.add(visibility, 'other');
gui.add(visibility, 'showFolder').onChange(function (val) {
// ???
});
What should i put instead of // ???
to change the visibility of folder
based on the val
argument?
Does dat.gui
provide this functionality? Or am I stuck with creating multiple versions of the same controls and creating a new one with the correct elements everytime I want to change the visibility of the folder?