Updated a test code for dat-gui.

This commit is contained in:
satoru kimura
2015-06-01 12:39:06 +09:00
parent 2ca2ee37d4
commit 83ea26f60b

View File

@@ -157,3 +157,19 @@ var FizzyText = function () {
update();
}
// ------------ 11. Object Literal Tests
() => {
var obj = {a:1,b:1};
var gui = new dat.GUI();
var controller = gui.add(obj, 'maxSize', 0, 10);
controller.onChange(function (value) {
// Fires on every change, drag, keypress, etc.
});
controller.onFinishChange(function (value) {
// Fires when a controller loses focus.
alert("The new value is " + value);
});
}