1 | initial version |
To remove a dat.GUI element, you can use the following steps:
var gui = new dat.GUI();
var folder = gui.addFolder("My Folder");
var myControl = folder.add(myObject, "myProperty");
remove()
method on the element to remove it. For example:myControl.remove();
removeFolder()
method. For example:folder.removeFolder();
Note: You can also hide elements using the domElement.style.display = 'none'
method, but this does not remove the element from the dat.GUI instance.