There seem to be no onStartChange
event in dat.gui, is there a simple workaround?
Asked
Active
Viewed 3,213 times
5
-
Did my answer help? Or do you have a problem with dat.GUI's onChange event? – Ben Smith Nov 10 '14 at 12:18
-
I knew about the onChange event, I was asking if there were a specific event fired only at the beginning of the change (actually, it was more a feature request I guess...). – arthur.sw Nov 10 '14 at 20:57
2 Answers
0
If you are moving a scroller the onChange will update as the change is occurring. If you want it to only update after all changes then use .onFinishChange, here is an example below using onChange.
gui.add(options, "distance").min(1).max(300).step(1)
.onChange(
function(){
yourVar = this.getValue();
}
)
The api docs are now located here onChange

JJWALLACE
- 51
- 9