dat.gui/demo.html
George Michael Brower 7f9467358f Added add handlers
2011-01-23 14:47:42 -07:00

40 lines
788 B
HTML

<html>
<head>
<script type="text/javascript" src="gui.js"></script>
<script type="text/javascript">
var controllableObject =
{
"numberProperty": 20,
"anotherNumberProperty": 0,
"textProperty": "a string",
"booleanProperty": false,
"functionProperty": function() {
alert("hi");
},
"objectProp": {}
};
// 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");
GUI.add(controllableObject, "objectProp");
</script>
</head>
<body>
</body>
</html>