mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Lightweight controller library for JavaScript.
3b4f6e3944
Included prettify.js in the repo so people checking the demo localy doesn't need the internets. Changed way of hidding the panel (controllerContainer.style.height rather than this.domElement.stylemarginTop). |
||
---|---|---|
controllers | ||
demo | ||
.gitignore | ||
gui-bare.css | ||
gui.css | ||
gui.js | ||
gui.min.js | ||
index.html | ||
README |
var controllableObject = { numberProperty: 20, anotherNumberProperty: 0, textProperty: "a string", booleanProperty: false, functionProperty: function() { alert("I am a function!"); } }; window.onload = function() { GUI.start(); // Creates a number box GUI.add(controllableObject, "numberProperty"); // Creates a slider (min, max) GUI.add(controllableObject, "anotherNumberProperty", -100, 100); // Creates a text field GUI.add(controllableObject, "textProperty"); // Creates a checkbox GUI.add(controllableObject, "booleanProperty"); // Creates a button GUI.add(controllableObject, "functionProperty"); }