2011-11-07 21:29:37 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2016-06-25 18:25:23 +00:00
|
|
|
|
2011-11-07 21:29:37 +00:00
|
|
|
<head>
|
|
|
|
</head>
|
2016-06-25 18:25:23 +00:00
|
|
|
|
2011-11-07 21:29:37 +00:00
|
|
|
<body>
|
2016-06-25 18:25:23 +00:00
|
|
|
<script type="text/javascript" src="build/dat.gui.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var obj = {
|
2016-06-25 18:51:29 +00:00
|
|
|
x: undefined,
|
|
|
|
y: undefined,
|
|
|
|
timer: 2.0
|
2016-06-25 18:25:23 +00:00
|
|
|
};
|
|
|
|
var gui = new dat.GUI();
|
2016-06-25 18:51:29 +00:00
|
|
|
gui.add(obj, 'timer').min(0).max(obj.timer).listen();
|
|
|
|
gui.add(obj, 'x').listen();
|
|
|
|
var y = gui.add(obj, 'y');
|
|
|
|
var interval = setInterval(function () {
|
|
|
|
obj.timer -= 0.1;
|
|
|
|
if (obj.timer <= 0) {
|
|
|
|
clearInterval(interval);
|
|
|
|
obj.x = "Not Undefined!";
|
|
|
|
obj.y = 1;
|
|
|
|
obj.timer = 0;
|
|
|
|
y.updateDisplay();
|
|
|
|
}
|
|
|
|
}, 100);
|
2016-06-25 18:25:23 +00:00
|
|
|
|
|
|
|
</script>
|
2011-11-07 21:29:37 +00:00
|
|
|
</body>
|
2016-06-25 18:25:23 +00:00
|
|
|
|
|
|
|
</html>
|