Used to determine if the controller is currently listening. Don't modify this value directly. Use the controller.listen( true|false ) method instead.
The controller's name. Use controller.name( 'Name' ) to modify this value.
Used to access the function bound to onChange events. Don't modify this value directly. Use the controller.onChange( callback ) method instead.
Used to access the function bound to onFinishChange events. Don't modify this value directly. Use the controller.onFinishChange( callback ) method instead.
The outermost container DOM element for this controller.
The value of object[ property ] when the controller was created.
The object this controller will modify.
The GUI that contains this controller.
The name of the property to control.
Destroys this controller and removes it from the parent GUI.
Disables this controller.
controller.disable();
controller.disable( false ); // enable
controller.disable( !controller._disabled ); // toggle
disable
Enables this controller.
controller.enable();
controller.enable( false ); // disable
controller.enable( controller._disabled ); // toggle
enable
Returns object[ property ].
value
Calls updateDisplay() every animation frame. Pass false to stop listening.
listen
Sets the maximum value. Only works on number controllers.
max
Sets the minimum value. Only works on number controllers.
min
Sets the name of the controller and its label in the GUI.
name
Pass a function to be called whenever a controller in this GUI changes.
change
Pass a function to be called whenever a controller in this GUI has finished changing.
finish change
Destroys this controller and replaces it with a new option controller. Provided as a more descriptive syntax for gui.add, but primarily for compatibility with dat.gui. Use caution, as this method will destroy old references to this controller. It will also change controller order if called out of sequence, moving the option controller to the end of the GUI.
// safe usage
gui.add( object1, 'property' ).options( [ 'a', 'b', 'c' ] );
gui.add( object2, 'property' );
// danger
const c = gui.add( object1, 'property' );
gui.add( object2, 'property' );
c.options( [ 'a', 'b', 'c' ] );
// controller is now at the end of the GUI even though it was added first
assert( c.parent.children.indexOf( c ) === -1 )
// c references a controller that no longer exists
options
Resets all controllers to their initial values.
reset
Sets the value of object[ property ], invokes any onChange handlers and updates the display.
value
Sets the step. Only works on number controllers.
step
Updates the display to keep it in sync with the current value. Useful for updating your controllers when their values have been modified outside of the GUI.
display
Generated using TypeDoc
Used to determine if the controller is disabled. Use controller.disable( true|false ) to modify this value