dat.gui flag

DAT.GUI is a lightweight controller library for JavaScript. It allows you to easily manipulate variables and fire functions on the fly.

Basic Usage

<script type='text/javascript' src='DAT.GUI.min.js'></script>
<script type='text/javascript'>

window.onload = function() {

   var fizzyText = new FizzyText('dat.gui');

   var gui = new DAT.GUI();

   // Text field
   gui.add(fizzyText, 'message');

   // Sliders with min + max
   gui.add(fizzyText, 'maxSize').min(0.5).max(7);
   gui.add(fizzyText, 'growthSpeed').min(0.01).max(1).step(0.05);
   gui.add(fizzyText, 'speed', 0.1, 2, 0.05); // shorthand for min/max/step

   gui.add(fizzyText, 'noiseStrength', 10, 100, 5);

   // Boolean checkbox
   gui.add(fizzyText, 'displayOutline');

   // Fires a function called 'explode'
   gui.add(fizzyText, 'explode').name('Explode!'); // Specify a custom name.

};

</script>