dat.gui how to hide menu with code

后端 未结 7 949
太阳男子
太阳男子 2021-02-06 04:06

I made a menu using dat.gui for my applcation with Three.js. It works fine, I have also discovered that pressing h key I can hide the menu created with dat.gui. My question is h

7条回答
  •  被撕碎了的回忆
    2021-02-06 04:11

    You can toggle the 'closed' class on the first ul tag within the gui domElement.

    Here's how to do it if you are using JQuery:

    var gui = new dat.GUI();
    $(gui.domElement).find(">ul").toggleClass("closed");
    

提交回复
热议问题