dat.gui how to hide menu with code

后端 未结 7 1053
太阳男子
太阳男子 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:19

    I'd recommend:

    $(gui.domElement).attr("hidden", true);
    

    as it also prevents clicking. With toggleHide() it's possible to still click it. Just closing it leaves the opportunity to re-open.

    Worked for me as I don't want the user to re-open it ;)

提交回复
热议问题