lil-gui/lil-gui.umd.js
/**
		 * Adds a controller to the GUI, inferring controller type using the `typeof` operator.
		 * @example
		 * gui.add( object, 'property' );
		 * gui.add( object, 'number', 0, 100, 1 );
		 * gui.add( object, 'options', [ 1, 2, 3 ] );
		 *
		 * @param {object} object The object the controller will modify.
		 * @param {string} property Name of the property to control.
		 * @param {number|object|Array} [$1] Minimum value for number controllers, or the set of
		 * selectable values for a dropdown.
		 * @param {number} [max] Maximum value for number controllers.
		 * @param {number} [step] Step value for number controllers.
		 * @returns {Controller}
		 */
Adds a controller to the GUI, inferring controller type using the `typeof` operator.


Adds a controller to the GUI inferring controller type using the ` typeof ` operator .
add( object, property, $1, max, step ) {
			if ( Object( $1 ) === $1 ) {
				return new OptionController( this, object, property, $1 );
			}
			const initialValue = object[ property ];
			switch ( typeof initialValue ) {
				case 'number':
					return new NumberController( this, object, property, $1, max, step );
				case 'boolean':
					return new BooleanController( this, object, property );
				case 'string':
					return new StringController( this, object, property );
				case 'function':
					return new FunctionController( this, object, property );
			}
			console.error( `gui.add failed
	property:`, property, `
	object:`, object, `
	value:`, initialValue );
		}
add ( object , property , $1 , max , step ) { if ( Object ( $1 ) === $1 ) { return new OptionController ( this , object , property , $1 ) ; } const initialValue = object [ property ] ; switch ( typeof initialValue ) { case 'number' : return new NumberController ( this , object , property , $1 , max , step ) ; case 'boolean' : return new BooleanController ( this , object , property ) ; case 'string' : return new StringController ( this , object , property ) ; case 'function' : return new FunctionController ( this , object , property ) ; } console . error ( ` ` , property , ` ` , object , ` ` , initialValue ) ; }
Adds a controller to the GUI, inferring controller type using the `typeof` operator.
Adds a controller to the GUI inferring controller type using the ` typeof ` operator .