Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a button using dat.gui

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"); 
like image 270
Lonelydatum Avatar asked Aug 21 '13 19:08

Lonelydatum


People also ask

What is dat GUI?

A lightweight graphical user interface for changing variables in JavaScript.


1 Answers

This creates a button with text left aligned.

var obj = { add:function(){ console.log("clicked") }};  gui.add(obj,'add'); 
like image 59
Lonelydatum Avatar answered Sep 23 '22 02:09

Lonelydatum