As part of playing with the "split depth GIF" effect in three.js, and as part of simply learning about three.js itself, I wanted to have a way to adjust various parameters so that I could see the effectiveness (or lack thereof) for certain combinations of values.
I have done this with the dat.GUI library by the Google Data Arts Team (source on github).
My sample interactive visualization that motivated my interest in dat.GUI is available at https://learnforeverlearn.com/splitdepth/.
The purpose of this note is to provide some details on basic usage of the fantastically useful dat.GUI tool. Links to more advanced tutorials are provided below.
Here is a few screenshots of my basic usage of this little library (live demo at https://learnforeverlearn.com/splitdepth/). Code snippets and what they do are shown in the section farther below.
(this screenshot from https://learnforeverlearn.com/splitdepth/)
(this screenshot from https://learnforeverlearn.com/splitdepth/)
dat.GUI will create the type of element based on the type of value you initially specify. If the property has a boolean value it will create a checkbox. If the property is a function, it will create a button.
Prior to Adding Controls
| |
|
|
Checkboxes
| |
|
|
Sliders
| |
|
|
Dropdowns
| |
|
|
Color (color picker on mouseover)
| |
|
|
Buttons
| |
|
|
I have yet to explore other slick features of dat.GUI - these are discussed in more detailed tutorials available at:
No comments:
Post a Comment