Lightweight controller library for JavaScript.
Go to file
2011-01-24 23:08:41 -08:00
controller.boolean.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
controller.function.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
controller.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
controller.number.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
controller.string.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
demo.css added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
gui-bare.css added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
gui.css added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
gui.js added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
index.html added github pages to gh-pages branch 2011-01-24 23:03:36 -08:00
README added README 2011-01-24 23:08:41 -08:00

    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");

    }