Is it possible to create a button using dat.gui

后端 未结 2 1660
余生分开走
余生分开走 2021-02-18 18:13

I would like to create a button using dat.gui library. In a perfect world, this would work like this:

gui.add(\"button\", \"click me\");
2条回答
  •  感动是毒
    2021-02-18 18:24

    This creates a button with text left aligned.

    var obj = { add:function(){ console.log("clicked") }};
    
    gui.add(obj,'add');
    

提交回复
热议问题