Optional expandedOptional hiddenOptional isOptional titleThe object the controller will modify.
Name of the property to control.
Optional values: number | object | any[]Minimum value for number controllers, or the set of selectable values for a dropdown.
Optional max: numberMaximum value for number controllers.
Optional step: numberStep value for number controllers.
gui.add( object, 'property' );
gui.add( object, 'number', 0, 100, 1 );
gui.add( object, 'options', [ 1, 2, 3 ] );
Optional opt_params: { Optional label?: stringOptional max?: numberOptional min?: numberOptional options?: object | any[]Optional step?: numberOptional type?: stringOptional view?: stringAdds a color controller to the GUI.
The object the controller will modify.
Name of the property to control.
params = {
cssColor: '#ff00ff',
rgbColor: { r: 0, g: 0.2, b: 0.4 },
customRange: [ 0, 127, 255 ],
};
gui.addColor( params, 'cssColor' );
gui.addColor( params, 'rgbColor' );
gui.addColor( params, 'customRange', 255 );
Adds a folder to the GUI, which is just another GUI. This method returns the nested GUI so you can add controllers to it.
Name to display in the folder's title bar.
const folder = gui.addFolder( 'Position' );
folder.add( position, 'x' );
folder.add( position, 'y' );
folder.add( position, 'z' );
Adds a controller to the GUI, inferring controller type using the
typeofoperator.