To add controllers, first you must have a GUI to add it to.
const gui = dat.GUIVR.create( 'settings' );
scene.add( gui );
gui.add( object, 'numericProperty', min, max );
Sliders have a step function which forces the value to be within the specified increment.
gui.add( object, 'property', min, max ).step( 0.1 );
gui.add( state, 'boolProperty' );
If state.boolProperty = true
or false
then the controller will become a checkbox.
folder.add( state, 'anyProperty', arrayOrObject );
If the third argument is an array or object, the controller will become a dropdown with those options.
gui.add( state, 'functionProperty' );
If state.functionProperty
is a function then the controller will become a button and the function will run whenever you press it.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4